RecoveryPointAdapter implementation that delegates storage to another RecoveryPointAdapter but provides conflation so that only every X updates are saved and/or only the last update every Y milliseconds is saved.
More...
#include <RecoveryPointAdapter.hpp>
|
| ConflatingRecoveryPointAdapter (const std::shared_ptr< RecoveryPointAdapterImpl > &delegate_, unsigned updateThreshold_=10, double timeoutMillis_=2000.0, long updateIntervalMillis_=2000) |
| Conflate updates to delegate_ where they will only be processed every updateIntervalMillis_ for subscriptions that have been updated at least updateThreshold_ times or haven't been updated for at least timeoutMillis_ milliseconds. More...
|
|
virtual bool | next (RecoveryPoint ¤t_) |
| Recovery is done by iteration over elements in storage. More...
|
|
virtual void | update (RecoveryPoint &recoveryPoint_) |
| Update the storage information with the given recovery point. More...
|
|
virtual void | purge () |
| Remove all data from the storage.
|
|
virtual void | purge (const Field &subId_) |
| Remove the specified subId_ from the storage. More...
|
|
virtual void | close () |
| Take any necessary actions to close the associated storage.
|
|
virtual void | updateAll () |
| Push all updates to underlying adapter.
|
|
virtual void | _runUpdateAll () |
| Lock is already held.
|
|
virtual void | prune () |
| Take any necessary actions to reduce associated storage size.
|
|
RecoveryPointAdapter implementation that delegates storage to another RecoveryPointAdapter but provides conflation so that only every X updates are saved and/or only the last update every Y milliseconds is saved.
AMPS::ConflatingRecoveryPointAdapter::ConflatingRecoveryPointAdapter |
( |
const std::shared_ptr< RecoveryPointAdapterImpl > & |
delegate_, |
|
|
unsigned |
updateThreshold_ = 10 , |
|
|
double |
timeoutMillis_ = 2000.0 , |
|
|
long |
updateIntervalMillis_ = 2000 |
|
) |
| |
|
inline |
Conflate updates to delegate_ where they will only be processed every updateIntervalMillis_ for subscriptions that have been updated at least updateThreshold_ times or haven't been updated for at least timeoutMillis_ milliseconds.
- Parameters
-
delegate_ | A shared pointer to the underlying delegate RecoveryPointAdapter. |
updateThreshold_ | The minimum number of updates for a given subId before a conflated update is delivered. Setting to 1 will prevent conflation from occurring. |
timeoutMillis_ | The maximum amount of time between conflated updates for a given subId. Setting to 0 will force all updates to be sent any time one update needs to be sent or every updateInterval. |
updateIntervalMillis_ | The amount of time the update thread can sit idle between sending conflated updates and checking for timeouts. |
virtual bool AMPS::ConflatingRecoveryPointAdapter::next |
( |
RecoveryPoint & |
current_ | ) |
|
|
inlinevirtual |
virtual void AMPS::ConflatingRecoveryPointAdapter::purge |
( |
const Field & |
subId_ | ) |
|
|
inlinevirtual |
virtual void AMPS::ConflatingRecoveryPointAdapter::update |
( |
RecoveryPoint & |
recoveryPoint_ | ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following file: