Falcon
Loading...
Searching...
No Matches
RingBuffer< T > Class Template Reference

#include <ringbuffer.hpp>

Public Member Functions

 RingBuffer (const T &prototype, int buffer_size, disruptor::ClaimStrategyOption claim_strategy_option, disruptor::WaitStrategyOption wait_strategy_option)
T * Get (const int64_t &sequence)

Detailed Description

template<typename T>
class RingBuffer< T >

this RingBuffer implementation is based on the disruptor::RingBuffer but it stores the data objects in a vector

Ring based store of reusable entries containing the data representing an event being exchanged between publisher and EventProcessors.

Parameters
<T>implementation storing the data for sharing during exchange or parallel coordination of an event.

Constructor & Destructor Documentation

◆ RingBuffer()

template<typename T>
RingBuffer< T >::RingBuffer ( const T & prototype,
int buffer_size,
disruptor::ClaimStrategyOption claim_strategy_option,
disruptor::WaitStrategyOption wait_strategy_option )
inline

Construct a RingBuffer with the full option set.

Parameters
prototypeof data object to store in ring buffer
buffer_sizeof the RingBuffer, must be a power of 2.
claim_strategy_optionthreading strategy for publishers claiming entries in the ring.
wait_strategy_optionwaiting strategy employed by processors_to_track waiting in entries becoming available.

Member Function Documentation

◆ Get()

template<typename T>
T * RingBuffer< T >::Get ( const int64_t & sequence)
inline

Get the event for a given sequence in the RingBuffer.

Parameters
sequencefor the event
Returns
event pointer at the specified sequence position.

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