An in-memory publish store, used to provide republish capability when in case of failover to an AMPS secondary.
More...
|
| MemoryPublishStore (int initialCapacity, bool errorOnPublishGap=false) |
| Constructs an in-memory public store with the specified number of blocks as the initial capacity. Creates a new MemoryPublishStore. More...
|
|
override void | discardUpTo (ulong sequence) |
| Discard messages in the store, up to and including the message specified by the passed in sequnence number. This is called by the client when it's notified a message is persisted on the server. The space used by discarded messages is made available for reuse by later messages. More...
|
|
override bool | getErrorOnPublishGap () |
| Get if a PublishStoreGapException can be thrown by the Store if there is an attempt to call discardUpTo with a sequence number lower than the last persisted sequence number. This could occur during logon after a failover event if the new server was not current on messages due to being an async replication destination. More...
|
|
override void | Dispose () |
| Disposes the MemoryPublishStore instance. More...
|
|
void | store (Message m) |
| Stores a message in the BlockPublishStore. More...
|
|
void | store (Message m, Boolean assignSequence) |
| Internal utility method for storing messages in the BlockPublishStore. More...
|
|
ulong | getLastPersisted () |
| Gets the last persisted sequence number More...
|
|
ulong | getLowestUnpersisted () |
| Gets the lowest unpersisted sequence number. More...
|
|
ulong | getHighestUnpersisted () |
| Gets the highest unpersisted sequence number. More...
|
|
void | setMessage (Message message) |
| Used internally by the Client to give the store a Message implementing the correct protocol for the connection. This Message instance is also used for replay operations. More...
|
|
virtual void | replay (StoreReplayer replayer) |
| Implemented to replay unpersisted messages from the stored blocks onto the provided StoreReplayer. More...
|
|
bool | replaySingle (StoreReplayer replayer, ulong sequence) |
| Implemented to find the unpersisted message with the specified sequence among the stored blocks, and replay it onto the provided StoreReplayer. Checks if the specified sequence is less than or equal to the stored metadata block's sequence number. More...
|
|
long | unpersistedCount () |
| Returns the count of unpersisted messages in the store. This count represents the number of messages that have been received but not yet persisted. More...
|
|
void | flush () |
| Wait for the store to discard everything that has been stored up to the point in time when flush is called, then return. More...
|
|
void | flush (int timeout) |
| Wait for the store to discard everything that has been stored up to the point in time when flush is called, then return. Throw an exception if this is not completed in the number of milliseconds specified by the timeout. More...
|
|
void | setResizeHandler (PublishStoreResizeHandler handler) |
| Set the resize handler for the publish store. An implementation can call the resize handler in the event that it needs to grow the size of the publish store. More...
|
|
void | setErrorOnPublishGap (bool errorOnPublishGap_) |
| Set if a PublishStoreGapException should be thrown by the Store if there is an attempt to call discardUpTo with a sequence number lower than the last persisted sequence number. This could occur during logon after a failover event if the new server was not current on messages due to being an async replication destination. More...
|
|
An in-memory publish store, used to provide republish capability when in case of failover to an AMPS secondary.
Publish stores hold messages until the AMPS server has acknowledged that they are persisted. When the client detects disconnection and reconnects, the client can republish any messages which have not been acknowledged by AMPS.
Use this PublishStore when you are concerned about server failover, only: MemoryPublishStore does not protect you in case of subscriber failure, because it has no on-disk backing store.