AMPS C# Client  5.3.3.4
AMPS C# Client for .NET
AMPS.Client.LoggedBookmarkStore Class Reference
+ Inheritance diagram for AMPS.Client.LoggedBookmarkStore:

Public Member Functions

 LoggedBookmarkStore (string path)
 
 LoggedBookmarkStore (string path, int targetNumberOfSubscriptions)
 
 LoggedBookmarkStore (string path, bool useLastModifiedTime)
 
 LoggedBookmarkStore (string path, RecoveryPointAdapter adapter_, RecoveryPointFactory factory_=null)
 
 LoggedBookmarkStore (string path, int targetNumberOfSubscriptions, RecoveryPointAdapter adapter_, RecoveryPointFactory factory_=null)
 
 LoggedBookmarkStore (string path, int targetNumberOfSubscriptions, bool useLastModifiedTime)
 
 LoggedBookmarkStore (string path, int targetNumberOfSubscriptions, bool useLastModifiedTime, RecoveryPointAdapter adapter_, RecoveryPointFactory factory_=null)
 
void prune ()
 
void prune (String tmpFileName_)
 
void _prune (String tmpFileName_)
 
long log (Message message)
 
void discard (Field subId, long bookmarkSeqNo)
 
void discard (Message message)
 
Field getMostRecent (Field subId, bool useList=true)
 
bool isDiscarded (Message message)
 
void persisted (Field subId, long bookmark)
 
void persisted (Field subId, BookmarkField bookmark)
 
long getOldestBookmarkSeq (Field subId)
 
void setResizeHandler (BookmarkStoreResizeHandler handler)
 
void purge ()
 
void purge (Field subId_)
 
void setRecoveryPointFactory (RecoveryPointFactory factory_)
 
void Dispose ()
 
void close ()
 
void setServerVersion (int version)
 
int getServerVersion ()
 

Detailed Description

LoggedBookmarkStore implements a sequentially written log of incoming and discarded messages. The store tracks every bookmark
processed in a file. An application should periodically call prune to manage the size of the file by removing outdated entries. The Developer Guide contains advice on strategies for pruning the LoggedBookmarkStore.

Member Function Documentation

◆ discard() [1/2]

void AMPS.Client.LoggedBookmarkStore.discard ( Field  subId,
long  bookmarkSeqNo 
)
inline

Log a discard-bookmark entry to the persistent log based on a bookmark sequence number.

Implements AMPS.Client.BookmarkStore.

◆ discard() [2/2]

void AMPS.Client.LoggedBookmarkStore.discard ( Message  message)
inline

Log a discard-bookmark entry to the persistent log based on a Message.

Implements AMPS.Client.BookmarkStore.

◆ getMostRecent()

Field AMPS.Client.LoggedBookmarkStore.getMostRecent ( Field  subId,
bool  useList = true 
)
inline

Returns the most recent bookmark from the log that ought to be used for (re-)subscriptions.

Implements AMPS.Client.BookmarkStore.

◆ getOldestBookmarkSeq()

long AMPS.Client.LoggedBookmarkStore.getOldestBookmarkSeq ( Field  subId)
inline

Called to retrieve the sequence number of the oldest bookmark in the store.

Implements AMPS.Client.BookmarkStore.

◆ isDiscarded()

bool AMPS.Client.LoggedBookmarkStore.isDiscarded ( Message  message)
inline

Called for each arriving message to determine if the application has already seen this bookmark and should not be reprocessed. Returns 'true' if the bookmark is in the log and should not be re-processed, false otherwise.

Implements AMPS.Client.BookmarkStore.

◆ log()

long AMPS.Client.LoggedBookmarkStore.log ( Message  mesage)
inline

Log a bookmark to the persistent log.

Returns
the corresponding bookmark sequence number for this bookmark

Implements AMPS.Client.BookmarkStore.

◆ persisted() [1/2]

void AMPS.Client.LoggedBookmarkStore.persisted ( Field  subId,
BookmarkField  bookmark 
)
inline

Called to mark a message as safely persisted by AMPS to all of its sync replication destination.

Implements AMPS.Client.BookmarkStore.

◆ persisted() [2/2]

void AMPS.Client.LoggedBookmarkStore.persisted ( Field  subId,
long  bookmarkSeqNo 
)
inline

Called to mark a message as safely persisted by AMPS to all of its sync replication destination.

Implements AMPS.Client.BookmarkStore.

◆ prune() [1/2]

void AMPS.Client.LoggedBookmarkStore.prune ( )
inline

Called on a LoggedBookmarkStore to remove bookmark records from the store when they are no longer needed; see the Developer Guide for advice on stratgies for when to call this function. If this function is not called, bookmark records are never removed from the LoggedBookmarkStore.

◆ prune() [2/2]

void AMPS.Client.LoggedBookmarkStore.prune ( String  tmpFileName_)
inline

Called on a LoggedBookmarkStore to remove bookmark records from the store when they are no longer needed (specifying the temporary file name to use during this process); see the Developer Guide for advice on stratgies for when to call this function. If this function is not called, bookmark records are never removed from the LoggedBookmarkStore.

◆ purge() [1/2]

void AMPS.Client.LoggedBookmarkStore.purge ( )
inline

Called to purge the contents of this store. Removes any tracking history associated with publishers and received messages, and may delete or truncate on-disk representations as well.

Implements AMPS.Client.BookmarkStore.

◆ purge() [2/2]

void AMPS.Client.LoggedBookmarkStore.purge ( Field  subId)
inline

Called to purge the contents of this store for a given subId. Removes any tracking history associated with publishers and received messages, and may delete or truncate on-disk representations as well.

Implements AMPS.Client.BookmarkStore.

◆ setResizeHandler()

void AMPS.Client.LoggedBookmarkStore.setResizeHandler ( BookmarkStoreResizeHandler  handler)
inline

Called to set a resize handler that is invoked when the store needs to resize.

Implements AMPS.Client.BookmarkStore.

◆ setServerVersion()

void AMPS.Client.LoggedBookmarkStore.setServerVersion ( int  version)
inline

Called to set the version of the server used with this store.

Implements AMPS.Client.BookmarkStore.


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