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

Public Member Functions

 HybridPublishStore (String path, int cap)
 
void Dispose ()
 
void setLowWatermark (int lowWatermark_)
 
ulong getLowestUnpersisted ()
 
void discardUpTo (ulong index)
 
virtual void replay (StoreReplayer replayer)
 
bool replaySingle (StoreReplayer replayer, ulong index)
 
long unpersistedCount ()
 
void store (Message message)
 
void setMessage (Message m)
 
ulong getLastPersisted ()
 
void flush ()
 
void flush (int timeout)
 
void setResizeHandler (PublishStoreResizeHandler handler)
 
void close ()
 

Protected Attributes

PublishStore _fileStore
 
MemoryPublishStore _memoryStore
 
int _cap
 
string _path
 
int _lowWatermark = 0
 

Member Function Documentation

◆ discardUpTo()

void AMPS.Client.HybridPublishStore.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.HybridPublishStore.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.HybridPublishStore.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.HybridPublishStore.getLastPersisted ( )
inline

Return the sequence of the last persisted message.

Implements AMPS.Client.Store.

◆ replay()

virtual void AMPS.Client.HybridPublishStore.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.HybridPublishStore.replaySingle ( StoreReplayer  replayer,
ulong  sequence 
)
inline

Replay the operation at the specified sequence.

Implements AMPS.Client.Store.

◆ setLowWatermark()

void AMPS.Client.HybridPublishStore.setLowWatermark ( int  lowWatermark_)
inline

Sets the low watermark; once we start swapping out to disk, we keep going until the number of entries in memory is lower than this.

Parameters
lowWatermark_The number of entries to serve as a low watermark.

◆ setMessage()

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

Set the Message that the Store will use for replay.

Implements AMPS.Client.Store.

◆ setResizeHandler()

void AMPS.Client.HybridPublishStore.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.HybridPublishStore.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.HybridPublishStore.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: