public class TopicService extends Object implements ManagedService, RemoteService, EventPublishingService
| Modifier and Type | Field and Description |
|---|---|
static int |
ORDERING_LOCKS_LENGTH |
static String |
SERVICE_NAME |
| Constructor and Description |
|---|
TopicService() |
| Modifier and Type | Method and Description |
|---|---|
String |
addMessageListener(String name,
MessageListener listener) |
TopicProxy |
createDistributedObject(String name) |
void |
destroyDistributedObject(String objectId) |
void |
dispatchEvent(Object event,
Object listener) |
LocalTopicStatsImpl |
getLocalTopicStats(String name) |
Lock |
getOrderLock(String key) |
ConcurrentMap<String,LocalTopicStatsImpl> |
getStatsMap() |
void |
incrementPublishes(String topicName) |
void |
incrementReceivedMessages(String topicName) |
void |
init(NodeEngine nodeEngine,
Properties properties)
Initializes this ManagedService
|
void |
publishEvent(String name,
TopicEvent event) |
boolean |
removeMessageListener(String name,
String registrationId) |
void |
reset()
reset this ManagedService back to initial state.
|
void |
shutdown(boolean terminate)
Shuts down this ManagedService.
|
public static final String SERVICE_NAME
public static final int ORDERING_LOCKS_LENGTH
public void init(NodeEngine nodeEngine, Properties properties)
ManagedServiceinit in interface ManagedServicenodeEngine - the NodeEngine this ManagedService belongs to.properties - the Properties. Can be used to pass settings to the service.public ConcurrentMap<String,LocalTopicStatsImpl> getStatsMap()
public void reset()
ManagedServicereset in interface ManagedServicepublic void shutdown(boolean terminate)
ManagedServiceshutdown in interface ManagedServicepublic TopicProxy createDistributedObject(String name)
createDistributedObject in interface RemoteServicepublic void destroyDistributedObject(String objectId)
destroyDistributedObject in interface RemoteServicepublic void dispatchEvent(Object event, Object listener)
dispatchEvent in interface EventPublishingServicepublic LocalTopicStatsImpl getLocalTopicStats(String name)
public void incrementPublishes(String topicName)
public void incrementReceivedMessages(String topicName)
public void publishEvent(String name, TopicEvent event)
public String addMessageListener(String name, MessageListener listener)
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.