AMPS C# Client  5.3.5.0
AMPS C# Client for .NET
AMPS.Client.RecoveryPointAdapter Interface Reference

An instance of this interface that can optionally be provided to MemoryBookmarkStore when it's constructed to persist recovery bookmark state for each bookmark replay subscription. The adapter can persist this state to an external store and retrieve it on application restart so that bookmark replay subscriptions can be continued approximately where they left off (with the possible delivery of some duplicate messages). Typically the constructor of any implementation class will take resources needed to connect to / authenticate with the external store and a unique AMPS client name or session name (that stays consistent across application runs) that identifies the AMPS client whose bookmark replay subscriptions want to have their recovery state persisted by this adapter. More...

+ Inheritance diagram for AMPS.Client.RecoveryPointAdapter:

Public Member Functions

void update (RecoveryPoint recoveryPoint_)
 This method should be implemented to write the passed in recovery point to the external store for the specified subscription. Only the latest recovery point needs to be kept for any given subscription id. When this adapter is registered directly with a bookmark store, this method is called by a bookmark store subscription (with its lock held) whenever the MOST_RECENT state of the subscription has potentially changed. If the associated bookmark store has multiple subscriptions, it's possible for this method to be called concurrently by each one, so this method should be implemented in a thread-safe manner. If this adapter is a delegate wrapped by a ConflatingRecoveryPointAdapter, then this method is only called by the conflating adapter's update thread periodically (never concurrently by multiple threads) without the subscription lock held. More...
 
void purge ()
 This method is called by the associated bookmark store's purge() method (with the bookmark store lock held) with the expectation that the adapter will delete all recover point data stored for all subscriptions known to this adapter. Because the bookmark store lock is held when this is called, this method will only be invoked by one thread at a time. More...
 
void purge (Field subId_)
 This method is called by the associated bookmark store's purge(subId) method (with the bookmark store lock held) with the expectation that the adapter will delete any recover point data stored for the specified subscription id. Because the bookmark store lock is held when this is called, this method will only be invoked by one thread at a time. More...
 
void close ()
 Take any necessary actions to close the underlying storage. More...
 

Detailed Description

An instance of this interface that can optionally be provided to MemoryBookmarkStore when it's constructed to persist recovery bookmark state for each bookmark replay subscription. The adapter can persist this state to an external store and retrieve it on application restart so that bookmark replay subscriptions can be continued approximately where they left off (with the possible delivery of some duplicate messages). Typically the constructor of any implementation class will take resources needed to connect to / authenticate with the external store and a unique AMPS client name or session name (that stays consistent across application runs) that identifies the AMPS client whose bookmark replay subscriptions want to have their recovery state persisted by this adapter.

Member Function Documentation

◆ close()

void AMPS.Client.RecoveryPointAdapter.close ( )

Take any necessary actions to close the underlying storage.

Implemented in AMPS.Client.SOWRecoveryPointAdapter, and AMPS.Client.ConflatingRecoveryPointAdapter.

◆ purge() [1/2]

void AMPS.Client.RecoveryPointAdapter.purge ( )

This method is called by the associated bookmark store's purge() method (with the bookmark store lock held) with the expectation that the adapter will delete all recover point data stored for all subscriptions known to this adapter. Because the bookmark store lock is held when this is called, this method will only be invoked by one thread at a time.

Implemented in AMPS.Client.SOWRecoveryPointAdapter, and AMPS.Client.ConflatingRecoveryPointAdapter.

◆ purge() [2/2]

void AMPS.Client.RecoveryPointAdapter.purge ( Field  subId_)

This method is called by the associated bookmark store's purge(subId) method (with the bookmark store lock held) with the expectation that the adapter will delete any recover point data stored for the specified subscription id. Because the bookmark store lock is held when this is called, this method will only be invoked by one thread at a time.

Parameters
subId_The id of the subscription being purged.

Implemented in AMPS.Client.SOWRecoveryPointAdapter, and AMPS.Client.ConflatingRecoveryPointAdapter.

◆ update()

void AMPS.Client.RecoveryPointAdapter.update ( RecoveryPoint  recoveryPoint_)

This method should be implemented to write the passed in recovery point to the external store for the specified subscription. Only the latest recovery point needs to be kept for any given subscription id. When this adapter is registered directly with a bookmark store, this method is called by a bookmark store subscription (with its lock held) whenever the MOST_RECENT state of the subscription has potentially changed. If the associated bookmark store has multiple subscriptions, it's possible for this method to be called concurrently by each one, so this method should be implemented in a thread-safe manner. If this adapter is a delegate wrapped by a ConflatingRecoveryPointAdapter, then this method is only called by the conflating adapter's update thread periodically (never concurrently by multiple threads) without the subscription lock held.

Parameters
recoveryPoint_The latest recovery point.

Implemented in AMPS.Client.SOWRecoveryPointAdapter, and AMPS.Client.ConflatingRecoveryPointAdapter.


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