CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
30 namespace catapult {
namespace disruptor {
37 explicit Disruptor(
size_t disruptorSize,
size_t elementTraceInterval = 1);
56 inline size_t size()
const {
std::atomic< uint64_t > m_allElementsCount
Definition: Disruptor.h:73
Disruptor(size_t disruptorSize, size_t elementTraceInterval=1)
Definition: Disruptor.cpp:33
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
uint64_t PositionType
Position within disruptor components.
Definition: DisruptorTypes.h:29
def debug(*args)
Definition: Parser.py:46
DisruptorElement & elementAt(PositionType position)
Gets element at given position.
Definition: Disruptor.h:51
bool isSkipped(PositionType position) const
Checks skip flag on the element at position.
Definition: Disruptor.cpp:52
uint64_t added() const
Gets the number of total elements added to the disruptor.
Definition: Disruptor.h:66
Augments consumer input with disruptor metadata.
Definition: DisruptorElement.h:28
A fixed size circular buffer.
Definition: CircularBuffer.h:29
utils::CircularBuffer< DisruptorElement > m_container
Definition: Disruptor.h:72
uint64_t DisruptorElementId
Id of a disruptor element.
Definition: DisruptorTypes.h:32
consumer< DisruptorElementId, const ConsumerCompletionResult & > ProcessingCompleteFunc
Function signature for signaling that processing finished.
Definition: DisruptorTypes.h:117
size_t size() const
Gets the size of the disruptor.
Definition: Disruptor.h:56
Disruptor wraps around CircularBuffer for usage within Consumer Dispatcher.
Definition: Disruptor.h:33
DisruptorElementId add(ConsumerInput &&input, const ProcessingCompleteFunc &processingComplete)
Definition: Disruptor.cpp:39
Definition: AddressExtractionExtension.cpp:28
size_t m_elementTraceInterval
Definition: Disruptor.h:71
constexpr bool IsIntervalElementId(DisruptorElementId id, size_t interval)
Returns true if id matches interval.
Definition: DisruptorElement.h:99
A class that can neither be copied nor moved.
Definition: NonCopyable.h:26
size_t capacity() const
Gets the capacity of the disruptor.
Definition: Disruptor.h:61
void markSkipped(PositionType position, CompletionCode code)
Sets skip flag on the element at position with code.
Definition: Disruptor.cpp:48
uint32_t CompletionCode
Optional code that can provide additional consumer completion information.
Definition: DisruptorTypes.h:35