AMPS C# Client
5.3.5.0
AMPS C# Client for .NET
|
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...
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... | |
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.
void AMPS.Client.RecoveryPointAdapter.close | ( | ) |
Take any necessary actions to close the underlying storage.
Implemented in AMPS.Client.SOWRecoveryPointAdapter, and AMPS.Client.ConflatingRecoveryPointAdapter.
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.
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.
subId_ | The id of the subscription being purged. |
Implemented in AMPS.Client.SOWRecoveryPointAdapter, and AMPS.Client.ConflatingRecoveryPointAdapter.
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.
recoveryPoint_ | The latest recovery point. |
Implemented in AMPS.Client.SOWRecoveryPointAdapter, and AMPS.Client.ConflatingRecoveryPointAdapter.