public class TopicProxy<E> extends AbstractDistributedObject<TopicService> 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.
|
String |
addMessageListenerInternal(MessageListener listener) |
LocalTopicStats |
getLocalTopicStats()
Returns statistics about this topic, like total number of publishes/receives
|
LocalTopicStats |
getLocalTopicStatsInternal() |
String |
getName()
Returns the unique name for this DistributedObject.
|
String |
getServiceName()
Returns the service name for this object.
|
void |
initialize() |
void |
publish(E message)
Publishes the message to all subscribers of this topic
|
void |
publishInternal(Data message) |
boolean |
removeMessageListener(String registrationId)
Stops receiving messages for the given message listener.
|
boolean |
removeMessageListenerInternal(String registrationId) |
destroy, equals, getId, getNameAsPartitionAwareData, getNodeEngine, getPartitionKey, getService, hashCode, invalidate, postDestroy, throwNotActiveException, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitdestroy, getId, getPartitionKey, getServiceNamepublic TopicProxy(String name, NodeEngine nodeEngine, TopicService service)
public void publish(E message)
ITopicpublic String addMessageListener(MessageListener<E> listener)
ITopicaddMessageListener in interface ITopic<E>public boolean removeMessageListener(String registrationId)
ITopicremoveMessageListener in interface ITopic<E>registrationId - Id of listener registration.public LocalTopicStats getLocalTopicStats()
ITopicgetLocalTopicStats in interface ITopic<E>public void initialize()
initialize in interface InitializingObjectpublic LocalTopicStats getLocalTopicStatsInternal()
public void publishInternal(Data message)
public String addMessageListenerInternal(MessageListener listener)
public boolean removeMessageListenerInternal(String registrationId)
public String getServiceName()
DistributedObjectgetServiceName in interface DistributedObjectgetServiceName in class AbstractDistributedObject<TopicService>public String getName()
DistributedObjectgetName in interface DistributedObjectCopyright © 2015 Hazelcast, Inc.. All Rights Reserved.