Disruptor wraps around CircularBuffer for usage within Consumer Dispatcher.
More...
Disruptor wraps around CircularBuffer for usage within Consumer Dispatcher.
◆ Disruptor()
catapult::disruptor::Disruptor::Disruptor |
( |
size_t |
disruptorSize, |
|
|
size_t |
elementTraceInterval = 1 |
|
) |
| |
|
explicit |
Creates disruptor container able to hold disruptorSize elements with optional queue logging every elementTraceInterval elements.
◆ add()
Adds an input to the underlying container and returns the assigned disruptor element id. Once the processing of the input is complete, processingComplete will be called.
◆ added()
uint64_t catapult::disruptor::Disruptor::added |
( |
| ) |
const |
|
inline |
Gets the number of total elements added to the disruptor.
◆ capacity()
size_t catapult::disruptor::Disruptor::capacity |
( |
| ) |
const |
|
inline |
Gets the capacity of the disruptor.
◆ elementAt()
Gets element at given position.
◆ isSkipped()
bool catapult::disruptor::Disruptor::isSkipped |
( |
PositionType |
position | ) |
const |
Checks skip flag on the element at position.
◆ markSkipped()
Sets skip flag on the element at position with code.
◆ size()
size_t catapult::disruptor::Disruptor::size |
( |
| ) |
const |
|
inline |
Gets the size of the disruptor.
◆ m_allElementsCount
std::atomic<uint64_t> catapult::disruptor::Disruptor::m_allElementsCount |
|
private |
◆ m_container
◆ m_elementTraceInterval
size_t catapult::disruptor::Disruptor::m_elementTraceInterval |
|
private |
The documentation for this class was generated from the following files: