AMPS C# Client  5.3.5.0
AMPS C# Client for .NET
AMPS.Client.ConflatingRecoveryPointAdapter Class Reference

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...

+ Inheritance diagram for AMPS.Client.ConflatingRecoveryPointAdapter:

Public Member Functions

delegate void ExceptionListener (Exception e)
 A place to report exceptions in the background thread More...
 
 ConflatingRecoveryPointAdapter (RecoveryPointAdapter adapter_)
 Creates a new ConflatingRecoveryPointAdapter. More...
 
 ConflatingRecoveryPointAdapter (RecoveryPointAdapter adapter_, int updateThreshold_, long timeoutMillis_, int updateIntervalMillis_)
 Creates a new ConflatingRecoveryPointAdapter. More...
 
void setExceptionListener (ExceptionListener exceptionListener)
 Sets the ExceptionListener instance used for communicating absorbed exceptions. More...
 
void update (RecoveryPoint recoveryPoint_)
 Conflate an update to the newest recovery point. It ensures that updates are correctly handled for both repeat and new subscription data. More...
 
void purge ()
 This method is responsible for removing or purging all recovery point information from the instance(self) and from the wrapped adapter. More...
 
void purge (Field subId_)
 Remove all recovery point information for a given sub id. More...
 
void close ()
 Force all updates to the underlying adapter, then close it. More...
 
IEnumerator< RecoveryPointGetEnumerator ()
 Return an enumerator over recovered RecoveryPoints. More...
 
bool MoveNext ()
 IEnumerator move to next item. More...
 
void Reset ()
 IEnumerator reset - not implemented. More...
 
void updateAll ()
 Force all held updates to be flushed to the underlying adapter. More...
 

Protected Attributes

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...
 

Properties

RecoveryPoint Current [get]
 The current RecoveryPoint from the underlying Adapter. More...
 

Detailed Description

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).

Constructor & Destructor Documentation

◆ ConflatingRecoveryPointAdapter() [1/2]

AMPS.Client.ConflatingRecoveryPointAdapter.ConflatingRecoveryPointAdapter ( RecoveryPointAdapter  adapter_)
inline

Creates a new ConflatingRecoveryPointAdapter.

Parameters
adapter_The RecoveryPointAdapter doing the actual updates and recovery.

◆ 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.

Member Function Documentation

◆ close()

void AMPS.Client.ConflatingRecoveryPointAdapter.close ( )
inline

Force all updates to the underlying adapter, then close it.

Implements AMPS.Client.RecoveryPointAdapter.

◆ 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

Remove all recovery point information for a given sub id.

Implements AMPS.Client.RecoveryPointAdapter.

◆ 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
exceptionListenerThe 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.

Member Data Documentation

◆ _adapter

RecoveryPointAdapter AMPS.Client.ConflatingRecoveryPointAdapter._adapter = null
protected

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.

Property Documentation

◆ Current

RecoveryPoint AMPS.Client.ConflatingRecoveryPointAdapter.Current
get

The current RecoveryPoint from the underlying Adapter.


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