AMPS C# Client
5.3.3.4
AMPS C# Client for .NET
|
Public Member Functions | |
void | store (Message message) |
void | discardUpTo (ulong sequence) |
void | replay (StoreReplayer replayer) |
bool | replaySingle (StoreReplayer replayer, ulong sequence) |
long | unpersistedCount () |
ulong | getLastPersisted () |
void | flush () |
void | flush (int timeout) |
void | setMessage (Message message) |
void | setResizeHandler (PublishStoreResizeHandler handler) |
Represents a message store. The AMPS client uses message stores for recovery purposes. The store is responsible for maintaining the state of published messages and recovering that state in the event of a disconnection. Optionally, the store may persist message state and recover that state if the application restarts.
void AMPS.Client.Store.discardUpTo | ( | ulong | sequence | ) |
Discard all operations up to the index provided.
index | the sequence number to keep – all previous sequence numbers will be discarded |
Implemented in AMPS.Client.HybridPublishStore, and AMPS.Client.BlockPublishStore.
void AMPS.Client.Store.flush | ( | ) |
Wait for the store to discard everything that has been stored up to the point in time when flush is called, then return.
Implemented in AMPS.Client.HybridPublishStore, and AMPS.Client.BlockPublishStore.
void AMPS.Client.Store.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.
timeout | the number of milliseconds to wait for the flush |
Implemented in AMPS.Client.HybridPublishStore, and AMPS.Client.BlockPublishStore.
ulong AMPS.Client.Store.getLastPersisted | ( | ) |
Return the sequence of the last persisted message.
Implemented in AMPS.Client.HybridPublishStore, and AMPS.Client.BlockPublishStore.
void AMPS.Client.Store.replay | ( | StoreReplayer | replayer | ) |
Replay all operations in the store using the provided StoreReplayer.
replayer | the StoreReplayer to use to replay the operation |
Implemented in AMPS.Client.HybridPublishStore, and AMPS.Client.BlockPublishStore.
bool AMPS.Client.Store.replaySingle | ( | StoreReplayer | replayer, |
ulong | sequence | ||
) |
Replay the operation at the specified sequence.
Implemented in AMPS.Client.HybridPublishStore, and AMPS.Client.BlockPublishStore.
void AMPS.Client.Store.setMessage | ( | Message | message | ) |
Set the Message that the Store will use for replay.
Implemented in AMPS.Client.BlockPublishStore, and AMPS.Client.HybridPublishStore.
void AMPS.Client.Store.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.
Implemented in AMPS.Client.HybridPublishStore, and AMPS.Client.BlockPublishStore.
void AMPS.Client.Store.store | ( | Message | message | ) |
Store the provided message. The message sequence is the key the client can later use to replay the operation or remove the operation from the store. Implementations may assume that the index increases monotonically.
message | The message to store. |
Implemented in AMPS.Client.HybridPublishStore, and AMPS.Client.BlockPublishStore.
long AMPS.Client.Store.unpersistedCount | ( | ) |
Return the number of operations in the store.
Implemented in AMPS.Client.HybridPublishStore, and AMPS.Client.BlockPublishStore.