AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.3.0
AMPS::MemoryPublishStore Class Reference

A StoreImpl implementation that uses MemoryStoreBuffer as its buffer to hold published messages in memory. More...

#include <MemoryPublishStore.hpp>

+ Inheritance diagram for AMPS::MemoryPublishStore:

Public Member Functions

 MemoryPublishStore (size_t blockPerRealloc_)
 Create a MemoryPublishStore with a specified initial capacity in bytes. More...
 
- Public Member Functions inherited from AMPS::BlockPublishStore
amps_uint32_t getBlockSize ()
 Return the size left in a block for data when it has a header in it. More...
 
amps_uint32_t getBlockDataSize ()
 Return the size left in a block for data when it has a header in it. More...
 
 BlockPublishStore (Buffer *buffer_, amps_uint32_t blocksPerRealloc_=1000, bool isFile_=false, amps_uint32_t blockSize_=DEFAULT_BLOCK_SIZE)
 Create a BlockPublishStore using buffer_, that grows by blocksPerRealloc_ blocks when it must grow. More...
 
virtual ~BlockPublishStore ()
 Destructor that cleans up the buffer and other associated memory.
 
virtual amps_uint64_t store (const Message &message_)
 Store a given message that will be delivered to AMPS. More...
 
amps_uint64_t store (const Message &message_, bool assignSequence_)
 Store a given message that will be delivered to AMPS. More...
 
virtual void discardUpTo (amps_uint64_t index_)
 Remove all messages with an index up to and including index_. More...
 
void replay (StoreReplayer &replayer_)
 Replay all messages in the Store onto the given StoreReplayer. More...
 
bool replaySingle (StoreReplayer &replayer_, amps_uint64_t index_)
 Replay one message in the Store onto the given StoreReplayer. More...
 
size_t unpersistedCount () const
 Method to return the count of messages that currently in the Store because they have not been discarded, presumably because AMPS has not yet acknowledged them. More...
 
virtual void flush (long timeout_)
 Method to wait for the Store to discard everything that has been stored up to the point in time when flush is called. More...
 
amps_uint64_t getLowestUnpersisted () const
 Get the oldest unpersisted message sequence in the store. More...
 
amps_uint64_t getLastPersisted (void)
 Get the last persisted sequence number. More...
 
- Public Member Functions inherited from AMPS::StoreImpl
virtual void setResizeHandler (PublishStoreResizeHandler handler_, void *userData_)
 Set a handler to be called if the Store needs to resize in order to keep storing messages. More...
 

Additional Inherited Members

- Public Types inherited from AMPS::BlockPublishStore
- Static Public Member Functions inherited from AMPS::BlockPublishStore
static amps_uint32_t getBlockHeaderSize ()
 Block header is number of blocks, total length, sequence number, crc, next in chain offset. More...
 
static amps_uint32_t getBlockChainHeaderSize ()
 Block chain header is operation, command id length, correlation id length, expiration length, sow key length, topic length, sow delete flag, ack types. More...
 
- Static Public Member Functions inherited from AMPS::StoreImpl
static size_t getUnsetPosition ()
 Method to return the value used to represent not found or unset.
 
static amps_uint64_t getUnsetSequence ()
 Method to return the value used to represent no such sequence.
 

Detailed Description

A StoreImpl implementation that uses MemoryStoreBuffer as its buffer to hold published messages in memory.

This store does not persist the published messages, so this store cannot be used to guarantee message publication if the application restarts.

Constructor & Destructor Documentation

AMPS::MemoryPublishStore::MemoryPublishStore ( size_t  blockPerRealloc_)
inline

Create a MemoryPublishStore with a specified initial capacity in bytes.

Parameters
blockPerRealloc_The number of blocks to grow by when capacity has been exceeded.

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