AMPS C# Client  5.3.3.4
AMPS C# Client for .NET
AMPS.Client.Store Interface Reference
+ Inheritance diagram for AMPS.Client.Store:

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)
 

Detailed Description

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.

Member Function Documentation

◆ discardUpTo()

void AMPS.Client.Store.discardUpTo ( ulong  sequence)

Discard all operations up to the index provided.

Parameters
indexthe sequence number to keep – all previous sequence numbers will be discarded

Implemented in AMPS.Client.HybridPublishStore, and AMPS.Client.BlockPublishStore.

◆ flush() [1/2]

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.

◆ flush() [2/2]

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.

Parameters
timeoutthe number of milliseconds to wait for the flush

Implemented in AMPS.Client.HybridPublishStore, and AMPS.Client.BlockPublishStore.

◆ getLastPersisted()

ulong AMPS.Client.Store.getLastPersisted ( )

Return the sequence of the last persisted message.

Implemented in AMPS.Client.HybridPublishStore, and AMPS.Client.BlockPublishStore.

◆ replay()

void AMPS.Client.Store.replay ( StoreReplayer  replayer)

Replay all operations in the store using the provided StoreReplayer.

Parameters
replayerthe StoreReplayer to use to replay the operation

Implemented in AMPS.Client.HybridPublishStore, and AMPS.Client.BlockPublishStore.

◆ replaySingle()

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.

◆ setMessage()

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.

◆ setResizeHandler()

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.

◆ store()

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.

Parameters
messageThe message to store.

Implemented in AMPS.Client.HybridPublishStore, and AMPS.Client.BlockPublishStore.

◆ unpersistedCount()

long AMPS.Client.Store.unpersistedCount ( )

Return the number of operations in the store.

Implemented in AMPS.Client.HybridPublishStore, and AMPS.Client.BlockPublishStore.


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