|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hazelcast.config.ReliableTopicConfig
@Beta public class ReliableTopicConfig
Configuration for the a reliable ITopic
.
The reliable topic makes use of the Ringbuffer
to store the actual messages.
To configure the ringbuffer for a reliable topic, define a ringbuffer in the config with exactly the same name. It is very
unlikely that you want to run with the default settings.
When a ReliableTopic start, it will always start from the tail+1 item from the RingBuffer. It will not chew its way through
all available events but it will wait for the next item being published.
In the reliable topic global order is always maintained. So all listeners will observe exactly the same order of sequence of
messages.
Field Summary | |
---|---|
static int |
DEFAULT_READ_BATCH_SIZE
The default read batch size. |
static boolean |
DEFAULT_STATISTICS_ENABLED
Default value for statistics enabled. |
static TopicOverloadPolicy |
DEFAULT_TOPIC_OVERLOAD_POLICY
The default slow consumer policy |
Constructor Summary | |
---|---|
ReliableTopicConfig(String name)
Creates a new ReliableTopicConfig with default settings. |
Method Summary | |
---|---|
ReliableTopicConfig |
addMessageListenerConfig(ListenerConfig listenerConfig)
Adds a ListenerConfig. |
ReliableTopicConfig |
getAsReadOnly()
Returns a readonly version of the ReliableTopicConfig. |
Executor |
getExecutor()
Gets the Executor that is going to process the events. |
List<ListenerConfig> |
getMessageListenerConfigs()
Gets the List of MessageListener configurations. |
String |
getName()
Gets the name of the topic. |
int |
getReadBatchSize()
Gets the maximum number of items to read in a batch. |
TopicOverloadPolicy |
getTopicOverloadPolicy()
Gets the TopicOverloadPolicy |
boolean |
isStatisticsEnabled()
Checks if statistics are enabled. |
ReliableTopicConfig |
setExecutor(Executor executor)
Sets the Executor that is going to process the event. |
ReliableTopicConfig |
setReadBatchSize(int readBatchSize)
Sets the read batch size. |
ReliableTopicConfig |
setStatisticsEnabled(boolean statisticsEnabled)
Enabled or disabled statistics. |
ReliableTopicConfig |
setTopicOverloadPolicy(TopicOverloadPolicy topicOverloadPolicy)
Sets the TopicOverloadPolicy. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_READ_BATCH_SIZE
public static final TopicOverloadPolicy DEFAULT_TOPIC_OVERLOAD_POLICY
public static final boolean DEFAULT_STATISTICS_ENABLED
Constructor Detail |
---|
public ReliableTopicConfig(String name)
Method Detail |
---|
public String getName()
public TopicOverloadPolicy getTopicOverloadPolicy()
public ReliableTopicConfig setTopicOverloadPolicy(TopicOverloadPolicy topicOverloadPolicy)
TopicOverloadPolicy
for more details about this setting.
topicOverloadPolicy
- the new TopicOverloadPolicy.
IllegalArgumentException
- if topicOverloadPolicy is null.public Executor getExecutor()
ExecutionService.ASYNC_EXECUTOR
is used.
setExecutor(java.util.concurrent.Executor)
public ReliableTopicConfig setExecutor(Executor executor)
executor
- the Executor. if the executor is null, the ExecutionService.ASYNC_EXECUTOR
will
be used to process the event.
public int getReadBatchSize()
public ReliableTopicConfig setReadBatchSize(int readBatchSize)
readBatchSize
- the readBatchSize
IllegalArgumentException
- if readBatchSize is smaller than 1.public boolean isStatisticsEnabled()
public ReliableTopicConfig setStatisticsEnabled(boolean statisticsEnabled)
statisticsEnabled
- if statistics should be enabled
public List<ListenerConfig> getMessageListenerConfigs()
public ReliableTopicConfig addMessageListenerConfig(ListenerConfig listenerConfig)
listenerConfig
- the ListenerConfig to add.
NullPointerException
- if listenerConfig is null.public ReliableTopicConfig getAsReadOnly()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |