AMPS C# Client
5.3.5.0
AMPS C# Client for .NET
|
Implements a bookmark store useful for handling server failover scenarios, but without a backing store to recover from subscriber failure. More...
Public Member Functions | |
MemoryBookmarkStore () | |
Initializes a new instance of the MemoryBookmarkStore class with default settings. More... | |
MemoryBookmarkStore (RecoveryPointAdapter adapter_, RecoveryPointFactory factory_=null) | |
Initializes a new instance of the MemoryBookmarkStore class with the specified adapter and factory. More... | |
MemoryBookmarkStore (int targetNumberOfSubscriptions) | |
Initialize self with a target number of subscriptions to store. More... | |
void | setRecoveryPointFactory (RecoveryPointFactory factory_) |
Change the RecoveryPointFactory used by this store for its adaptor. More... | |
void | Dispose () |
Disposes resources used by the MemoryBookmarkStore. More... | |
long | log (Message message) |
This is a method the Client calls and is not for customer user. Logs a message's bookmark to the bookmark store and updates the message's bookmark sequence number. More... | |
void | discard (Field subId, long bookmarkSeqNo) |
Discards a bookmark entry associated with a specific subscription and bookmark sequence number. More... | |
void | discard (Message message) |
Discards a bookmark entry based on the information provided in the message. More... | |
Field | getMostRecent (Field subId, bool useList=true) |
Retrieves the most recent bookmark associated with a subscription identified by the given subId. More... | |
bool | isDiscarded (Message message) |
This method is called internally by the client to determine whether a message's bookmark received from the amps server has already been discarded OR already been delivered to the subscriber during this run. More... | |
void | persisted (Field subId, long bookmark) |
Old style of setting a persisted bookmark no longer used. More... | |
void | persisted (Field subId, BookmarkField bookmark) |
This method is called by the client and it is used to process persisted acknowledgements that track a safe recovery point in the txlog. Sets a persisted bookmark for a subscription. More... | |
void | purge (Field subId_) |
Removes all entries in the bookmark store associated with a specific subscription ID(subId_ ). This method is used to clear messages received and discarded for a particular subscription. This should not be called if the store is still attached to a connected Client where this subId is still active. More... | |
void | purge () |
Purges the entire bookmark store, removing all entries. This method removes all information about any subscriptions. This should not be called if the store is still attached to a connected Client with any active subscriptions. More... | |
long | getOldestBookmarkSeq (Field subId) |
Retrieves the oldest active bookmark sequence number that is not discarded for the given subscription. More... | |
void | setResizeHandler (BookmarkStoreResizeHandler handler) |
Sets a handler for bookmark store resize events. More... | |
void | setServerVersion (int version) |
Used internally to change the version of the AMPS server that this bookmark store's client has connected to. More... | |
int | getServerVersion () |
Return the server version that was set by the Client. More... | |
Implements a bookmark store useful for handling server failover scenarios, but without a backing store to recover from subscriber failure.
An optional RecoveryPointAdapter can be specified at construction to persist bookmark subscription recovery state to an external store so the subscription can be resumed if the subscriber fails.
|
inline |
Initializes a new instance of the MemoryBookmarkStore class with default settings.
|
inline |
Initializes a new instance of the MemoryBookmarkStore class with the specified adapter and factory.
adapter_ | The recovery point adapter. |
factory_ | The recovery point factory. |
|
inline |
Initialize self with a target number of subscriptions to store.
targetNumberOfSubscriptions | The number of subscriptions this store will need to track. |
|
inline |
Discards a bookmark entry associated with a specific subscription and bookmark sequence number.
subId | The identifier of the subscription. |
bookmarkSeqNo | The sequence number of the bookmark entry to discard. |
AMPSException | If an error occurs while discarding from the bookmark store. |
Implements AMPS.Client.BookmarkStore.
|
inline |
Discards a bookmark entry based on the information provided in the message.
message | The message containing information about the bookmark to discard. |
AMPSException | If an error occurs while discarding from the bookmark store. |
Implements AMPS.Client.BookmarkStore.
|
inline |
Disposes resources used by the MemoryBookmarkStore.
Retrieves the most recent bookmark associated with a subscription identified by the given subId.
subId | The identifier of the subscription for which to retrieve the most recent bookmark. |
useList | A flag indicating whether to retrieve the most recent bookmark as a list or just the single bookmark that was last discarded. A list is the only way to guarantee successful failover and no missed message. |
AMPSException | If an error occurs while retrieving the most recent bookmark or if the store is not open. |
Implements AMPS.Client.BookmarkStore.
|
inline |
Retrieves the oldest active bookmark sequence number that is not discarded for the given subscription.
subId | The identifier of the subscription for which to retrieve the oldest bookmark sequence number. |
AMPSException | If an error occurs while retrieving the oldest bookmark sequence number or if the store is not open. |
Implements AMPS.Client.BookmarkStore.
|
inline |
Return the server version that was set by the Client.
|
inline |
This method is called internally by the client to determine whether a message's bookmark received from the amps server has already been discarded OR already been delivered to the subscriber during this run.
message | The message containing the bookmark to check for discarding. |
AMPSException | If an error occurs while checking if the bookmark is discarded or if the store is not open. |
Implements AMPS.Client.BookmarkStore.
|
inline |
This is a method the Client calls and is not for customer user. Logs a message's bookmark to the bookmark store and updates the message's bookmark sequence number.
message | The message to log, containing the bookmark to be stored. |
Exceptions.AMPSException | If an error occurs while logging to the bookmark store. |
Implements AMPS.Client.BookmarkStore.
|
inline |
This method is called by the client and it is used to process persisted acknowledgements that track a safe recovery point in the txlog. Sets a persisted bookmark for a subscription.
subId | The identifier of the subscription for which to set the persisted bookmark. |
bookmark | The persisted bookmark value to set. |
AMPSException | If an error occurs while setting the persisted bookmark or if the store is not open. |
Implements AMPS.Client.BookmarkStore.
|
inline |
Old style of setting a persisted bookmark no longer used.
subId | The subId associated with the bookmark to be persisted. |
bookmark | The bookmark to be persisted. |
Implements AMPS.Client.BookmarkStore.
|
inline |
Purges the entire bookmark store, removing all entries. This method removes all information about any subscriptions. This should not be called if the store is still attached to a connected Client with any active subscriptions.
Implements AMPS.Client.BookmarkStore.
|
inline |
Removes all entries in the bookmark store associated with a specific subscription ID(subId_
). This method is used to clear messages received and discarded for a particular subscription. This should not be called if the store is still attached to a connected Client where this subId is still active.
subId_ | The subscription ID for which to remove entries from the store. |
Implements AMPS.Client.BookmarkStore.
|
inline |
Change the RecoveryPointFactory used by this store for its adaptor.
factory_ | The new RecoveryPointFactory |
|
inline |
Sets a handler for bookmark store resize events.
handler | The BookmarkStoreResizeHandler to set. |
Implements AMPS.Client.BookmarkStore.
|
inline |
Used internally to change the version of the AMPS server that this bookmark store's client has connected to.
version | An AMPS server version integer of the form 05030400 for version 5.3.4.0. |
Implements AMPS.Client.BookmarkStore.