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.ByteSequence
Store.StoreReplayer
Modifier and Type | Field and Description |
---|---|
static int |
BLOCK_SIZE
The size of each block the store allocates.
|
_buffer, _errorOnPublishGap, _resizeHandler, AMPS_MIN_PUB_STORE_DISCARDED_VERSION, METADATA_LAST_DISCARDED_LOCATION, METADATA_VERSION_LOCATION
SOWDeleteByBookmark, 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.
|
close, discardUpTo, flush, flush, getErrorOnPublishGap, getHighestUnpersisted, getLastPersisted, getLowestUnpersisted, growFreeListIfEmpty, recover, replay, replaySingle, setErrorOnPublishGap, setMessage, setResizeHandler, store, store, unpersistedCount
public static final int BLOCK_SIZE
public MemoryPublishStore(int initialCapacity) throws StoreException
initialCapacity
- The number of blocks to allocate on constructionStoreException
- Thrown when an operation fails with details of the
failure.