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

Consumer input composed of a range of entities augmented with metadata. More...

Collaboration diagram for catapult::disruptor::ConsumerInput:

Public Member Functions

 ConsumerInput ()
 Creates a default consumer input. More...
 
 ConsumerInput (model::AnnotatedBlockRange &&range, InputSource source=InputSource::Unknown)
 Creates a consumer input around a block range with an optional input source (inputSource). More...
 
 ConsumerInput (model::AnnotatedTransactionRange &&range, InputSource source=InputSource::Unknown)
 Creates a consumer input around a transaction range with an optional input source (inputSource). More...
 
bool empty () const
 Returns true if this input is empty and has no elements. More...
 
bool hasBlocks () const
 Returns true if this input is not empty and has blocks. More...
 
bool hasTransactions () const
 Returns true if this input is not empty and has transactions. More...
 
BlockElementsblocks ()
 Returns the block elements associated with this input. More...
 
const BlockElementsblocks () const
 Returns the const block elements associated with this input. More...
 
TransactionElementstransactions ()
 Returns the (free) transaction elements associated with this input. More...
 
const TransactionElementstransactions () const
 Returns the const (free) transaction elements associated with this input. More...
 
InputSource source () const
 Gets the source of this input. More...
 
const KeysourcePublicKey () const
 Gets the (optional) source public key. More...
 
model::BlockRange detachBlockRange ()
 Detaches the block range associated with this input. More...
 
model::TransactionRange detachTransactionRange ()
 Detaches the transaction range associated with this input. More...
 

Private Attributes

model::BlockRange m_blockRange
 
model::TransactionRange m_transactionRange
 
BlockElements m_blockElements
 
TransactionElements m_transactionElements
 
InputSource m_source
 
Key m_sourcePublicKey
 
Height m_startHeight
 
Height m_endHeight
 

Friends

std::ostream & operator<< (std::ostream &out, const ConsumerInput &input)
 Insertion operator for outputting input to out. More...
 

Detailed Description

Consumer input composed of a range of entities augmented with metadata.

Constructor & Destructor Documentation

◆ ConsumerInput() [1/3]

catapult::disruptor::ConsumerInput::ConsumerInput ( )

Creates a default consumer input.

◆ ConsumerInput() [2/3]

catapult::disruptor::ConsumerInput::ConsumerInput ( model::AnnotatedBlockRange &&  range,
InputSource  source = InputSource::Unknown 
)
explicit

Creates a consumer input around a block range with an optional input source (inputSource).

Here is the call graph for this function:

◆ ConsumerInput() [3/3]

catapult::disruptor::ConsumerInput::ConsumerInput ( model::AnnotatedTransactionRange &&  range,
InputSource  source = InputSource::Unknown 
)
explicit

Creates a consumer input around a transaction range with an optional input source (inputSource).

Here is the call graph for this function:

Member Function Documentation

◆ blocks() [1/2]

BlockElements & catapult::disruptor::ConsumerInput::blocks ( )

Returns the block elements associated with this input.

◆ blocks() [2/2]

const BlockElements & catapult::disruptor::ConsumerInput::blocks ( ) const

Returns the const block elements associated with this input.

◆ detachBlockRange()

model::BlockRange catapult::disruptor::ConsumerInput::detachBlockRange ( )

Detaches the block range associated with this input.

Here is the call graph for this function:

◆ detachTransactionRange()

model::TransactionRange catapult::disruptor::ConsumerInput::detachTransactionRange ( )

Detaches the transaction range associated with this input.

Here is the call graph for this function:

◆ empty()

bool catapult::disruptor::ConsumerInput::empty ( ) const

Returns true if this input is empty and has no elements.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasBlocks()

bool catapult::disruptor::ConsumerInput::hasBlocks ( ) const

Returns true if this input is not empty and has blocks.

Here is the call graph for this function:

◆ hasTransactions()

bool catapult::disruptor::ConsumerInput::hasTransactions ( ) const

Returns true if this input is not empty and has transactions.

Here is the call graph for this function:

◆ source()

InputSource catapult::disruptor::ConsumerInput::source ( ) const

Gets the source of this input.

Here is the caller graph for this function:

◆ sourcePublicKey()

const Key & catapult::disruptor::ConsumerInput::sourcePublicKey ( ) const

Gets the (optional) source public key.

◆ transactions() [1/2]

TransactionElements & catapult::disruptor::ConsumerInput::transactions ( )

Returns the (free) transaction elements associated with this input.

◆ transactions() [2/2]

const TransactionElements & catapult::disruptor::ConsumerInput::transactions ( ) const

Returns the const (free) transaction elements associated with this input.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const ConsumerInput input 
)
friend

Insertion operator for outputting input to out.

Member Data Documentation

◆ m_blockElements

BlockElements catapult::disruptor::ConsumerInput::m_blockElements
private

◆ m_blockRange

model::BlockRange catapult::disruptor::ConsumerInput::m_blockRange
private

◆ m_endHeight

Height catapult::disruptor::ConsumerInput::m_endHeight
private

◆ m_source

InputSource catapult::disruptor::ConsumerInput::m_source
private

◆ m_sourcePublicKey

Key catapult::disruptor::ConsumerInput::m_sourcePublicKey
private

◆ m_startHeight

Height catapult::disruptor::ConsumerInput::m_startHeight
private

◆ m_transactionElements

TransactionElements catapult::disruptor::ConsumerInput::m_transactionElements
private

◆ m_transactionRange

model::TransactionRange catapult::disruptor::ConsumerInput::m_transactionRange
private

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