CatapultServer
v0.5.0.1 (Elephant)
|
Batches entity ranges for processing by a ConsumerDispatcher. More...
Classes | |
struct | RangeGroupKey |
struct | RangeGroupKeyHasher |
Public Member Functions | |
BatchRangeDispatcher (ConsumerDispatcher &dispatcher) | |
Creates a batch range dispatcher around dispatcher. More... | |
void | queue (TAnnotatedEntityRange &&range, InputSource source) |
Queues processing of range from source. More... | |
void | dispatch () |
Dispatches all queued elements to the underlying dispatcher. More... | |
bool | empty () const |
Returns true if no ranges are currently queued. More... | |
Private Types | |
using | EntityRange = decltype(TAnnotatedEntityRange::Range) |
using | GroupedRangesMap = std::unordered_map< RangeGroupKey, std::vector< EntityRange >, RangeGroupKeyHasher > |
Private Attributes | |
ConsumerDispatcher & | m_dispatcher |
GroupedRangesMap | m_rangesMap |
utils::SpinLock | m_lock |
Batches entity ranges for processing by a ConsumerDispatcher.
|
private |
|
private |
|
inlineexplicit |
Creates a batch range dispatcher around dispatcher.
|
inline |
Dispatches all queued elements to the underlying dispatcher.
|
inline |
Returns true
if no ranges are currently queued.
|
inline |
Queues processing of range from source.
|
private |
|
mutableprivate |
|
private |