E
- the type of message in this topicpublic class TopicProxy<E> extends TopicProxySupport implements ITopic<E>
PARTITIONING_STRATEGY
Constructor and Description |
---|
TopicProxy(String name,
NodeEngine nodeEngine,
TopicService service) |
Modifier and Type | Method and Description |
---|---|
String |
addMessageListener(MessageListener<E> listener)
Subscribes to this topic.
|
LocalTopicStats |
getLocalTopicStats()
Returns statistics about this topic, like total number of publishes/receives
|
void |
publish(E message)
Publishes the message to all subscribers of this topic
|
boolean |
removeMessageListener(String registrationId)
Stops receiving messages for the given message listener.
|
addMessageListenerInternal, getLocalTopicStatsInternal, getName, getServiceName, initialize, publishInternal, removeMessageListenerInternal
destroy, equals, getDistributedObjectName, getNameAsPartitionAwareData, getNodeEngine, getOperationService, getPartitionId, getPartitionKey, getService, hashCode, invalidate, invokeOnPartition, postDestroy, preDestroy, throwNotActiveException, toData, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
destroy, getPartitionKey, getServiceName
public TopicProxy(String name, NodeEngine nodeEngine, TopicService service)
public void publish(E message)
ITopic
public String addMessageListener(MessageListener<E> listener)
ITopic
addMessageListener
in interface ITopic<E>
listener
- the MessageListener to add.public boolean removeMessageListener(String registrationId)
ITopic
removeMessageListener
in interface ITopic<E>
registrationId
- Id of listener registration.public LocalTopicStats getLocalTopicStats()
ITopic
getLocalTopicStats
in interface ITopic<E>
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.