CatapultServer  v0.5.0.1 (Elephant)
catapult::disruptor::DisruptorElement Class Reference

Augments consumer input with disruptor metadata. More...

Collaboration diagram for catapult::disruptor::DisruptorElement:

Public Member Functions

 DisruptorElement ()
 Creates a default disruptor element. More...
 
 DisruptorElement (ConsumerInput &&input, DisruptorElementId id, const ProcessingCompleteFunc &processingComplete)
 Creates a disruptor element around input with id and a completion handler processingComplete. More...
 
ConsumerInputinput ()
 Gets the consumer input. More...
 
const ConsumerInputinput () const
 Gets the consumer input. More...
 
DisruptorElementId id () const
 Gets the element id. More...
 
bool isSkipped () const
 Returns true if the element is skipped. More...
 
ConsumerCompletionResult completionResult () const
 Gets the current element completion result. More...
 
void markSkipped (PositionType position, CompletionCode code)
 Marks the element as skipped at position with code. More...
 
void markProcessingComplete ()
 Calls the completion handler for the element. More...
 

Private Attributes

ConsumerInput m_input
 
DisruptorElementId m_id
 
ProcessingCompleteFunc m_processingComplete
 
ConsumerCompletionResult m_result
 
std::unique_ptr< utils::SpinLockm_pSpinLock
 

Detailed Description

Augments consumer input with disruptor metadata.

Constructor & Destructor Documentation

◆ DisruptorElement() [1/2]

catapult::disruptor::DisruptorElement::DisruptorElement ( )
inline

Creates a default disruptor element.

◆ DisruptorElement() [2/2]

catapult::disruptor::DisruptorElement::DisruptorElement ( ConsumerInput &&  input,
DisruptorElementId  id,
const ProcessingCompleteFunc processingComplete 
)
inlineexplicit

Creates a disruptor element around input with id and a completion handler processingComplete.

Member Function Documentation

◆ completionResult()

ConsumerCompletionResult catapult::disruptor::DisruptorElement::completionResult ( ) const
inline

Gets the current element completion result.

◆ id()

DisruptorElementId catapult::disruptor::DisruptorElement::id ( ) const
inline

Gets the element id.

Here is the caller graph for this function:

◆ input() [1/2]

ConsumerInput& catapult::disruptor::DisruptorElement::input ( )
inline

Gets the consumer input.

Here is the caller graph for this function:

◆ input() [2/2]

const ConsumerInput& catapult::disruptor::DisruptorElement::input ( ) const
inline

Gets the consumer input.

◆ isSkipped()

bool catapult::disruptor::DisruptorElement::isSkipped ( ) const
inline

Returns true if the element is skipped.

◆ markProcessingComplete()

void catapult::disruptor::DisruptorElement::markProcessingComplete ( )
inline

Calls the completion handler for the element.

◆ markSkipped()

void catapult::disruptor::DisruptorElement::markSkipped ( PositionType  position,
CompletionCode  code 
)
inline

Marks the element as skipped at position with code.

Member Data Documentation

◆ m_id

DisruptorElementId catapult::disruptor::DisruptorElement::m_id
private

◆ m_input

ConsumerInput catapult::disruptor::DisruptorElement::m_input
private

◆ m_processingComplete

ProcessingCompleteFunc catapult::disruptor::DisruptorElement::m_processingComplete
private

◆ m_pSpinLock

std::unique_ptr<utils::SpinLock> catapult::disruptor::DisruptorElement::m_pSpinLock
private

◆ m_result

ConsumerCompletionResult catapult::disruptor::DisruptorElement::m_result
private

The documentation for this class was generated from the following file: