FARGOS/VISTA Object Management Environment Core
..
|
Class that extends OrderedInputSourceProxy with the ability to tolerate a certain number of out-of-order messages that are provided by the source. More...
#include <OrderedInput.hpp>
Public Member Functions | |
OrderedInputSourceProxyWithReordering (OrderedInputSource *interfaceFor, size_t maxReorder) | |
Constructor for reordering proxy. More... | |
virtual | ~OrderedInputSourceProxyWithReordering () |
void | dropProxy () |
Disconnects proxy from its client. More... | |
size_t | totalBlocksPending () const OME_ALWAYS_INLINE |
Returns total blocks already pending. More... | |
virtual OrderedInputSource::InputBlockReturn | getNextInputBlock (bool forceCopy=false, const struct timespec *maxWaitTime=nullptr) VIRTUAL_OVERRIDE |
Implementation of OrderedInputSource::getNextInputBlock() interface that inserts itself as a proxy between the caller and the true source of data. More... | |
![]() | |
OrderedInputSourceProxy (OrderedInputSource *interfaceFor) | |
Construct a proxy for an existing OrderedInputSource object. More... | |
virtual | ~OrderedInputSourceProxy () |
virtual void | recoverInputBlock (OrderedInputBlock *block) VIRTUAL_OVERRIDE |
virtual int | forwardInputBlock (OrderedInputBlock *block) VIRTUAL_OVERRIDE |
virtual const char * | sourceLabel (char *outputBfr, uint_fast32_t bfrLen) const VIRTUAL_OVERRIDE |
virtual void | noteEOFread () VIRTUAL_OVERRIDE |
virtual void | noteEOFprocessed () VIRTUAL_OVERRIDE |
Protected Attributes | |
OrderedInputPriorityQueue | reorderQueue |
only holds data from single source More... | |
bool | sawEOF |
indicates if end-of-file has been seen from this source More... | |
![]() | |
OrderedInputSource * | proxyFor |
points at the original input source More... | |
Class that extends OrderedInputSourceProxy with the ability to tolerate a certain number of out-of-order messages that are provided by the source.
This class is used by OrderedMultipleInputFilter::addInputSource() whenever a value value greater than 0 is passed for the preloadBy parameter or the OrderedMultipleInputFilter was created with a nonzero maxReorderFromSource argument.
It can be directly used by users to handle input sources that suffer from reordered events.
|
inline |
Constructor for reordering proxy.
interfaceFor | points at the true OrderedInputSource object. |
maxReorder | specifies the number of packets that can be reordered from this source. |
A distance of up to maxReorder out-of-order input blocks can be tolerated. Normally, a very small value is sufficient to yield the desired results, but a large value may be needed when attempting to reorganize simulation output log files whose timestamps change based on the day being simulated.
References OrderedInputSource::InputBlockReturn::block, io(), LOG_COMPONENT_CERR, LOG_ENDLINE, OrderedInputSource::InputBlockReturn::obtainedLen, OrderedInputPriorityQueue::pushBlock(), reorderQueue, and sawEOF.
|
inlinevirtual |
|
inline |
Disconnects proxy from its client.
References OrderedInputSourceProxy::proxyFor.
Referenced by OrderedMultipleInputFilter::addInputSource().
|
inlinevirtual |
Implementation of OrderedInputSource::getNextInputBlock() interface that inserts itself as a proxy between the caller and the true source of data.
It maintains a priority queue of pending blocks, which is used to tolerate out-of-order arrival of blocks.
Reimplemented from OrderedInputSourceProxy.
References OrderedInputSource::InputBlockReturn::block, OrderedInputPriorityQueue::getQueueLength(), OrderedInputBlock::inputFile, io(), LOG_COMPONENT_CERR, LOG_ENDLINE, OrderedInputSource::InputBlockReturn::obtainedLen, OME_EXPECT_FALSE, OME_EXPECT_TRUE, OrderedInputPriorityQueue::popNextBlock(), OrderedInputSourceProxy::proxyFor, OrderedInputPriorityQueue::pushBlock(), reorderQueue, sawEOF, and OrderedInputBlock::usedLen.
|
inline |
Returns total blocks already pending.
This is not an EOF indication; more blocks may be available from the source that have not yet been read.
References OrderedInputPriorityQueue::getQueueLength(), and reorderQueue.
Referenced by OrderedMultipleInputFilter::addInputSource().
|
protected |
only holds data from single source
Referenced by getNextInputBlock(), OrderedInputSourceProxyWithReordering(), and totalBlocksPending().
|
protected |
indicates if end-of-file has been seen from this source
Referenced by getNextInputBlock(), and OrderedInputSourceProxyWithReordering().
![]() | Generated: Tue Jul 28 2020 16:03:27
Support Information |