Hazelcast C++ Client
 All Classes Functions Variables Enumerations Pages
Public Member Functions | Static Public Attributes | List of all members
hazelcast::client::config::ReliableTopicConfig Class Reference

Public Member Functions

 ReliableTopicConfig (const char *topicName)
 
const std::string & getName () const
 Gets the name of the reliable topic. More...
 
int getReadBatchSize () const
 Gets the maximum number of items to read in a batch. More...
 
ReliableTopicConfigsetReadBatchSize (int batchSize)
 Sets the read batch size. More...
 

Static Public Attributes

static const int DEFAULT_READ_BATCH_SIZE = 10
 

Member Function Documentation

const std::string & hazelcast::client::config::ReliableTopicConfig::getName ( ) const

Gets the name of the reliable topic.

Returns
the name of the reliable topic.
int hazelcast::client::config::ReliableTopicConfig::getReadBatchSize ( ) const

Gets the maximum number of items to read in a batch.

Returned value will always be equal or larger than 1.

Returns
the read batch size.
ReliableTopicConfig & hazelcast::client::config::ReliableTopicConfig::setReadBatchSize ( int  batchSize)

Sets the read batch size.

The ReliableTopic tries to read a batch of messages from the ringbuffer. It will get at least one, but if there are more available, then it will try to get more to increase throughput. The minimal read batch size can be influenced using the read batch size.

If the readBatchSize is 10 and there are 50 messages available, 10 items are retrieved and processed consecutively.

If the readBatchSize is 10 and there are 2 items available, 2 items are retrieved and processed consecutively.

Parameters
readBatchSizethe maximum number of items to read in a batch.
Returns
the updated reliable topic config.
Exceptions
IllegalArgumentExceptionif readBatchSize is smaller than 1.

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