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

Classes

class  Block
 
interface  Buffer
 
class  ByteSequence
 

Public Member Functions

virtual void Dispose ()
 
void store (Message m)
 
void store (Message m, Boolean assignSequence)
 
void discardUpTo (ulong index)
 
ulong getLastPersisted ()
 
ulong getLowestUnpersisted ()
 
ulong getHighestUnpersisted ()
 
void setMessage (Message message)
 
virtual void replay (StoreReplayer replayer)
 
bool replaySingle (StoreReplayer replayer, ulong index)
 
long unpersistedCount ()
 
void flush ()
 
void flush (int timeout)
 
void setResizeHandler (PublishStoreResizeHandler handler)
 

Protected Member Functions

 BlockPublishStore (Buffer buffer, int blocksPerRealloc)
 
 BlockPublishStore (Buffer buffer, bool useCrc=false, int blocksPerRealloc=10000)
 
void recover ()
 
void growFreeListIfEmpty ()
 

Protected Attributes

PublishStoreResizeHandler _resizeHandler = null
 
Buffer _buffer
 
Utilities.CRC32 _crc = null
 

Member Function Documentation

◆ discardUpTo()

void AMPS.Client.BlockPublishStore.discardUpTo ( ulong  sequence)
inline

Discard all operations up to the index provided.

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

Implements AMPS.Client.Store.

◆ flush() [1/2]

void AMPS.Client.BlockPublishStore.flush ( )
inline

Wait for the store to discard everything that has been stored up to the point in time when flush is called, then return.

Implements AMPS.Client.Store.

◆ flush() [2/2]

void AMPS.Client.BlockPublishStore.flush ( int  timeout)
inline

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

Implements AMPS.Client.Store.

◆ getLastPersisted()

ulong AMPS.Client.BlockPublishStore.getLastPersisted ( )
inline

Return the sequence of the last persisted message.

Implements AMPS.Client.Store.

◆ replay()

virtual void AMPS.Client.BlockPublishStore.replay ( StoreReplayer  replayer)
inlinevirtual

Replay all operations in the store using the provided StoreReplayer.

Parameters
replayerthe StoreReplayer to use to replay the operation

Implements AMPS.Client.Store.

◆ replaySingle()

bool AMPS.Client.BlockPublishStore.replaySingle ( StoreReplayer  replayer,
ulong  sequence 
)
inline

Replay the operation at the specified sequence.

Implements AMPS.Client.Store.

◆ setMessage()

void AMPS.Client.BlockPublishStore.setMessage ( Message  message)
inline

Set the Message that the Store will use for replay.

Implements AMPS.Client.Store.

◆ setResizeHandler()

void AMPS.Client.BlockPublishStore.setResizeHandler ( PublishStoreResizeHandler  handler)
inline

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.

Implements AMPS.Client.Store.

◆ store()

void AMPS.Client.BlockPublishStore.store ( Message  message)
inline

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.

Implements AMPS.Client.Store.

◆ unpersistedCount()

long AMPS.Client.BlockPublishStore.unpersistedCount ( )
inline

Return the number of operations in the store.

Implements AMPS.Client.Store.


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