An implementation of the RecoveryPointAdapter interface that is meant to act as a wrapper around another recovery point adapter instance, delegating periodic updates to its wrapped adapter on an asynchronous update thread (which this instance starts). The intent is to decouple recovery state updates from message discards on a bookmark replay subscriptions so that fast paced subscriptions don't cause a rate of updates that consume too much bandwidth or overwhelm recovery point adapter implementations that use slower storage (slowing message discards).
More...
|
RecoveryPointAdapter | _adapter = null |
| The wrapped recovery point adapter instance we delegate to. More...
|
|
int | _updateThreshold = 10 |
| The threshold used to determine if a subscription is due for an update operation, based upon whether the subscription's update count exceeds this threshold since the last update operation. More...
|
|
long | _timeoutMillis = 2000 |
| The threshold used to determine if a subscription is due for an update operation, based upon whether this many milliseconds have elapsed since the last update operation. More...
|
|
int | _updateIntervalMillis = 2000 |
| The amount of time the update thread can sit idle between checking for timeouts and sending any pending updates. More...
|
|
An implementation of the RecoveryPointAdapter interface that is meant to act as a wrapper around another recovery point adapter instance, delegating periodic updates to its wrapped adapter on an asynchronous update thread (which this instance starts). The intent is to decouple recovery state updates from message discards on a bookmark replay subscriptions so that fast paced subscriptions don't cause a rate of updates that consume too much bandwidth or overwhelm recovery point adapter implementations that use slower storage (slowing message discards).
◆ ConflatingRecoveryPointAdapter() [1/2]
AMPS.Client.ConflatingRecoveryPointAdapter.ConflatingRecoveryPointAdapter |
( |
RecoveryPointAdapter |
adapter_ | ) |
|
|
inline |
◆ ConflatingRecoveryPointAdapter() [2/2]
AMPS.Client.ConflatingRecoveryPointAdapter.ConflatingRecoveryPointAdapter |
( |
RecoveryPointAdapter |
adapter_, |
|
|
int |
updateThreshold_, |
|
|
long |
timeoutMillis_, |
|
|
int |
updateIntervalMillis_ |
|
) |
| |
|
inline |
Creates a new ConflatingRecoveryPointAdapter.
- Parameters
-
adapter_ | The RecoveryPointAdapter doing the actual updates and recovery. - Parameters
-
updateThreshold_ | The maximum number of updates to a single subId before a conflated update is delivered. - Parameters
-
timeoutMillis_ | The maximum amount of time in ms between conflated updates for each subId. - Parameters
-
updateIntervalMillis_ | The maximum amount of time in ms the update thread can sit idle before checking for timeouts. |
|
|
|
◆ close()
void AMPS.Client.ConflatingRecoveryPointAdapter.close |
( |
| ) |
|
|
inline |
◆ ExceptionListener()
delegate void AMPS.Client.ConflatingRecoveryPointAdapter.ExceptionListener |
( |
Exception |
e | ) |
|
A place to report exceptions in the background thread
◆ GetEnumerator()
IEnumerator<RecoveryPoint> AMPS.Client.ConflatingRecoveryPointAdapter.GetEnumerator |
( |
| ) |
|
|
inline |
Return an enumerator over recovered RecoveryPoints.
◆ MoveNext()
bool AMPS.Client.ConflatingRecoveryPointAdapter.MoveNext |
( |
| ) |
|
|
inline |
IEnumerator move to next item.
◆ purge() [1/2]
void AMPS.Client.ConflatingRecoveryPointAdapter.purge |
( |
| ) |
|
|
inline |
This method is responsible for removing or purging all recovery point information from the instance(self) and from the wrapped adapter.
Implements AMPS.Client.RecoveryPointAdapter.
◆ purge() [2/2]
void AMPS.Client.ConflatingRecoveryPointAdapter.purge |
( |
Field |
subId_ | ) |
|
|
inline |
◆ Reset()
void AMPS.Client.ConflatingRecoveryPointAdapter.Reset |
( |
| ) |
|
|
inline |
IEnumerator reset - not implemented.
◆ setExceptionListener()
void AMPS.Client.ConflatingRecoveryPointAdapter.setExceptionListener |
( |
ExceptionListener |
exceptionListener | ) |
|
|
inline |
Sets the ExceptionListener instance used for communicating absorbed exceptions.
- Parameters
-
exceptionListener | The exception listener instance to invoke for exceptions. |
◆ update()
void AMPS.Client.ConflatingRecoveryPointAdapter.update |
( |
RecoveryPoint |
recoveryPoint_ | ) |
|
|
inline |
Conflate an update to the newest recovery point. It ensures that updates are correctly handled for both repeat and new subscription data.
- Parameters
-
recoveryPoint_ | The newest recovery point to save. |
Implements AMPS.Client.RecoveryPointAdapter.
◆ updateAll()
void AMPS.Client.ConflatingRecoveryPointAdapter.updateAll |
( |
| ) |
|
|
inline |
Force all held updates to be flushed to the underlying adapter.
◆ _adapter
The wrapped recovery point adapter instance we delegate to.
◆ _timeoutMillis
long AMPS.Client.ConflatingRecoveryPointAdapter._timeoutMillis = 2000 |
|
protected |
The threshold used to determine if a subscription is due for an update operation, based upon whether this many milliseconds have elapsed since the last update operation.
◆ _updateIntervalMillis
int AMPS.Client.ConflatingRecoveryPointAdapter._updateIntervalMillis = 2000 |
|
protected |
The amount of time the update thread can sit idle between checking for timeouts and sending any pending updates.
◆ _updateThreshold
int AMPS.Client.ConflatingRecoveryPointAdapter._updateThreshold = 10 |
|
protected |
The threshold used to determine if a subscription is due for an update operation, based upon whether the subscription's update count exceeds this threshold since the last update operation.
◆ Current
The documentation for this class was generated from the following file:
- AMPS.Client/ConflatingRecoveryPointAdapter.cs