public class TopicConfig extends Object
ITopic
.Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_GLOBAL_ORDERING_ENABLED
Default global ordering configuration.
|
Constructor and Description |
---|
TopicConfig()
Creates a TopicConfig.
|
TopicConfig(String name)
Creates a TopicConfig with the given name.
|
TopicConfig(TopicConfig config)
Creates a
TopicConfig by cloning another TopicConfig. |
Modifier and Type | Method and Description |
---|---|
TopicConfig |
addMessageListenerConfig(ListenerConfig listenerConfig)
Adds a message listener to this topic (listens for when messages are added or removed).
|
boolean |
equals(Object obj)
Checks if the given object is equal to this topic.
|
TopicConfigReadOnly |
getAsReadOnly() |
List<ListenerConfig> |
getMessageListenerConfigs()
Gets the list of message listeners (listens for when messages are added or removed) for this topic.
|
String |
getName()
Gets the name of the topic, null if nothing is set.
|
int |
hashCode() |
boolean |
isGlobalOrderingEnabled()
Checks if global ordering is enabled (all nodes listening to the same topic
get their messages in the same order), or disabled (nodes get
the messages in the order that the messages are published).
|
boolean |
isStatisticsEnabled()
Checks if statistics are enabled for this topic.
|
TopicConfig |
setGlobalOrderingEnabled(boolean globalOrderingEnabled)
Enable global ordering (all nodes listening to the same topic
get their messages in the same order), or disable it (nodes get
the messages in the order that the messages are published).
|
TopicConfig |
setMessageListenerConfigs(List<ListenerConfig> listenerConfigs)
Sets the list of message listeners (listens for when messages are added or removed) for this topic.
|
TopicConfig |
setName(String name)
Sets the name of the topic.
|
TopicConfig |
setStatisticsEnabled(boolean statisticsEnabled)
Enables or disables statistics for this topic.
|
String |
toString() |
public static final boolean DEFAULT_GLOBAL_ORDERING_ENABLED
public TopicConfig()
public TopicConfig(String name)
name
- the name of the Topic.public TopicConfig(TopicConfig config)
TopicConfig
by cloning another TopicConfig.config
- the TopicConfig to clone.public TopicConfigReadOnly getAsReadOnly()
public String getName()
public TopicConfig setName(String name)
name
- the topic name to set.IllegalArgumentException
- if name is null or an empty string.public boolean isGlobalOrderingEnabled()
public TopicConfig setGlobalOrderingEnabled(boolean globalOrderingEnabled)
globalOrderingEnabled
- set to true to enable global ordering, false to disablepublic TopicConfig addMessageListenerConfig(ListenerConfig listenerConfig)
listenerConfig
- The message listener to add to this topic.public List<ListenerConfig> getMessageListenerConfigs()
public TopicConfig setMessageListenerConfigs(List<ListenerConfig> listenerConfigs)
listenerConfigs
- The list of message listeners for this topic.public boolean isStatisticsEnabled()
public TopicConfig setStatisticsEnabled(boolean statisticsEnabled)
statisticsEnabled
- True to enable statistics for this topic, false to disable.public boolean equals(Object obj)
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.