RecoveryPointAdapter virtual base class for implementing external storage of subscription recovery points and recovery from storage.
More...
#include <SOWRecoveryPointAdapter.hpp>
|
| SOWRecoveryPointAdapter (const Client &storeClient_, const string &trackedClientName_, unsigned timeoutMillis_=5000, bool useTimestamp_=false, bool closeClient_=true, bool updateFailureThrows_=false, const string &topic_=AMPS_SOW_STORE_DEFAULT_TOPIC, const string &clientNameField_=AMPS_SOW_STORE_DEFAULT_CLIENT_FIELD, const string &subIdField_=AMPS_SOW_STORE_DEFAULT_SUB_FIELD, const string &bookmarkField_=AMPS_SOW_STORE_DEFAULT_BOOKMARK_FIELD) |
| Create a SOWRecoveryPointAdapter for a BookmarkStore that writes updated RecoveryPoints to the server where storeClient_ is connected to the storeTopic_ using trackedClientName_ in the clientNameField_ and the subId from the RecoveryPoint in the subIdField_ as the key fields and the bookmark from the RecoveryPoint in the bookmarkField_ as the bookmark. More...
|
|
virtual bool | next (RecoveryPoint ¤t_) |
| Recovery is done by iteration over elements in storage. More...
|
|
virtual void | update (RecoveryPoint &recoveryPoint_) |
| Update the storage information with the given recovery point. More...
|
|
virtual void | purge () |
| Remove all data from the storage.
|
|
virtual void | purge (const Field &subId_) |
| Remove the specified subId_ from the storage. More...
|
|
virtual void | close () |
| Take any necessary actions to close the associated storage.
|
|
void | setExceptionListener (const std::shared_ptr< const ExceptionListener > &pListener_) |
| Set an exception listener on this adapter that will be notified of all exceptions that occur rather than silently absorbing them. More...
|
|
virtual void | prune () |
| Take any necessary actions to reduce associated storage size.
|
|
RecoveryPointAdapter virtual base class for implementing external storage of subscription recovery points and recovery from storage.
AMPS::SOWRecoveryPointAdapter::SOWRecoveryPointAdapter |
( |
const Client & |
storeClient_, |
|
|
const string & |
trackedClientName_, |
|
|
unsigned |
timeoutMillis_ = 5000 , |
|
|
bool |
useTimestamp_ = false , |
|
|
bool |
closeClient_ = true , |
|
|
bool |
updateFailureThrows_ = false , |
|
|
const string & |
topic_ = AMPS_SOW_STORE_DEFAULT_TOPIC , |
|
|
const string & |
clientNameField_ = AMPS_SOW_STORE_DEFAULT_CLIENT_FIELD , |
|
|
const string & |
subIdField_ = AMPS_SOW_STORE_DEFAULT_SUB_FIELD , |
|
|
const string & |
bookmarkField_ = AMPS_SOW_STORE_DEFAULT_BOOKMARK_FIELD |
|
) |
| |
|
inline |
Create a SOWRecoveryPointAdapter for a BookmarkStore that writes updated RecoveryPoints to the server where storeClient_ is connected to the storeTopic_ using trackedClientName_ in the clientNameField_ and the subId from the RecoveryPoint in the subIdField_ as the key fields and the bookmark from the RecoveryPoint in the bookmarkField_ as the bookmark.
- Parameters
-
storeClient_ | A Client that is connected and logged on to a server containing the SOW for bookmark storage. This client must NOT be the tracked client. |
trackedClientName_ | The name of the client for which this store is being used. It is an UsageException for trackedClientName_ to match the name of storeClient_. |
timeoutMillis_ | The max time to wait for the sow query that returns bookmarks saved in the store to return the next record. |
useTimestamp_ | If true, the recovered bookmarks will also include the update timestamp, which is useful if the bookmarks are no longer in the transaction log. |
closeClient_ | If true, the storeClient_ will be disconnected when the adapter is closed or destructed. Default is true. |
updateFailureThrows_ | If true, exceptions will be thrown out of this class to the BookmarkStore and eventually the tracked client's exception listener. If false, the default, exceptions are contained and only delivered to the exception listener set on this adapter. |
topic_ | The name of the SOW topic in which to store the RecoveryPoints. |
clientNameField_ | The name of key field in topic_ where the trackedClientName_ is saved for each RecoveryPoint. |
subIdField_ | The name of the key field in topic_ where the subId for each saved RecoveryPoint is stored. |
bookmarkField_ | The name of the field in topic_ where the bookmark from each RecoveryPoint is saved. |
virtual bool AMPS::SOWRecoveryPointAdapter::next |
( |
RecoveryPoint & |
current_ | ) |
|
|
inlinevirtual |
virtual void AMPS::SOWRecoveryPointAdapter::purge |
( |
const Field & |
subId_ | ) |
|
|
inlinevirtual |
void AMPS::SOWRecoveryPointAdapter::setExceptionListener |
( |
const std::shared_ptr< const ExceptionListener > & |
pListener_ | ) |
|
|
inline |
Set an exception listener on this adapter that will be notified of all exceptions that occur rather than silently absorbing them.
The exception listener will be ignored if the adapter is constructed with updateFailureThrows_ true; in that case exceptions will leave this adapter to be handled elsewhere.
- Parameters
-
virtual void AMPS::SOWRecoveryPointAdapter::update |
( |
RecoveryPoint & |
recoveryPoint_ | ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following file: