CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
25 namespace catapult {
namespace disruptor {
32 :
m_id(static_cast<uint64_t>(-1))
100 return 0 != interval && 0 ==
id % interval;
DisruptorElement()
Creates a default disruptor element.
Definition: DisruptorElement.h:31
uint64_t PositionType
Position within disruptor components.
Definition: DisruptorTypes.h:29
std::unique_ptr< utils::SpinLock > m_pSpinLock
Definition: DisruptorElement.h:92
Extended consumer result passed to completion callback.
Definition: DisruptorTypes.h:105
DisruptorElementId m_id
Definition: DisruptorElement.h:89
PositionType FinalConsumerPosition
Position of the final consumer processing the entity.
Definition: DisruptorTypes.h:113
Processing of the entity was aborted by a consumer.
Augments consumer input with disruptor metadata.
Definition: DisruptorElement.h:28
const ConsumerInput & input() const
Gets the consumer input.
Definition: DisruptorElement.h:52
uint64_t DisruptorElementId
Id of a disruptor element.
Definition: DisruptorTypes.h:32
std::ostream & operator<<(std::ostream &out, const ConsumerInput &input)
Definition: ConsumerInput.cpp:150
ConsumerInput & input()
Gets the consumer input.
Definition: DisruptorElement.h:47
ConsumerCompletionResult completionResult() const
Gets the current element completion result.
Definition: DisruptorElement.h:68
bool isSkipped() const
Returns true if the element is skipped.
Definition: DisruptorElement.h:62
consumer< DisruptorElementId, const ConsumerCompletionResult & > ProcessingCompleteFunc
Function signature for signaling that processing finished.
Definition: DisruptorTypes.h:117
DisruptorElement(ConsumerInput &&input, DisruptorElementId id, const ProcessingCompleteFunc &processingComplete)
Creates a disruptor element around input with id and a completion handler processingComplete.
Definition: DisruptorElement.h:38
ConsumerInput m_input
Definition: DisruptorElement.h:88
disruptor::CompletionCode CompletionCode
Optional code that can provide additional consumer completion information.
Definition: DisruptorTypes.h:80
void markSkipped(PositionType position, CompletionCode code)
Marks the element as skipped at position with code.
Definition: DisruptorElement.h:75
Definition: AddressExtractionExtension.cpp:28
void markProcessingComplete()
Calls the completion handler for the element.
Definition: DisruptorElement.h:83
ProcessingCompleteFunc m_processingComplete
Definition: DisruptorElement.h:90
constexpr bool IsIntervalElementId(DisruptorElementId id, size_t interval)
Returns true if id matches interval.
Definition: DisruptorElement.h:99
DisruptorElementId id() const
Gets the element id.
Definition: DisruptorElement.h:57
ConsumerCompletionResult m_result
Definition: DisruptorElement.h:91
std::lock_guard< SpinLock > SpinLockGuard
A spin lock guard.
Definition: SpinLock.h:60
disruptor::CompletionStatus CompletionStatus
Completion status.
Definition: DisruptorTypes.h:77
uint32_t CompletionCode
Optional code that can provide additional consumer completion information.
Definition: DisruptorTypes.h:35