public class MemoryPublishStore extends BlockPublishStore
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 only concerned about server failover: MemoryPublishStore does not protect you in case of subscriber failure, because it has no persisted backing store.
BlockPublishStore.Buffer, BlockPublishStore.ByteSequenceStore.StoreReplayer_blockSize, _buffer, _errorOnPublishGap, _resizeHandler, allowGapCheck, AMPS_MIN_BLOCK_SIZE_CONFIGURABLE_VERSION, AMPS_MIN_PUB_STORE_DISCARDED_VERSION, MAX_BLOCK_SIZE, METADATA_BLOCK_SIZE_LOCATION, METADATA_LAST_DISCARDED_LOCATION, METADATA_VERSION_LOCATION, MIN_BLOCK_SIZESOWDeleteByBookmark, SOWDeleteByBookmarkCancel, SOWDeleteByData, SOWDeleteByFilter, SOWDeleteByKeys| Constructor and Description |
|---|
MemoryPublishStore(int initialCapacity)
Construct an in-memory public store with the specified number of
blocks as the initial capacity.
|
MemoryPublishStore(int initialCapacity,
int blockSize)
Construct an in-memory public store with the specified number of
blocks of size blockSize as the initial capacity.
|
close, discardUpTo, flush, flush, getErrorOnPublishGap, getHighestUnpersisted, getLastPersisted, getLowestUnpersisted, growFreeListIfEmpty, recover, replay, replaySingle, setErrorOnPublishGap, setMessage, setResizeHandler, store, store, unpersistedCountpublic MemoryPublishStore(int initialCapacity)
throws StoreException
initialCapacity - The number of blocks to allocate on constructionStoreException - Thrown when an operation fails with details of the
failure.public MemoryPublishStore(int initialCapacity,
int blockSize)
throws StoreException
initialCapacity - The number of blocks to allocate on constructionblockSize - The size in bytes for each block.StoreException - Thrown when an operation fails with details of the
failure.