com.hazelcast.topic.impl
Class TopicService

java.lang.Object
  extended by com.hazelcast.topic.impl.TopicService
All Implemented Interfaces:
EventPublishingService, ManagedService, RemoteService

public class TopicService
extends Object
implements ManagedService, RemoteService, EventPublishingService


Field Summary
static int ORDERING_LOCKS_LENGTH
           
static String SERVICE_NAME
           
 
Constructor Summary
TopicService()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_NAME

public static final String SERVICE_NAME
See Also:
Constant Field Values

ORDERING_LOCKS_LENGTH

public static final int ORDERING_LOCKS_LENGTH
See Also:
Constant Field Values
Constructor Detail

TopicService

public TopicService()
Method Detail

init

public void init(NodeEngine nodeEngine,
                 Properties properties)
Description copied from interface: ManagedService
Initializes this ManagedService

Specified by:
init in interface ManagedService
Parameters:
nodeEngine - the NodeEngine this ManagedService belongs to.
properties - the Properties. Can be used to pass settings to the service.

getStatsMap

public ConcurrentMap<String,LocalTopicStatsImpl> getStatsMap()

reset

public void reset()
Description copied from interface: ManagedService
reset this ManagedService back to initial state. todo: what is the purpose of reset

Specified by:
reset in interface ManagedService

shutdown

public void shutdown(boolean terminate)
Description copied from interface: ManagedService
Shuts down this ManagedService. todo: what is the purpose of the terminate variable.

Specified by:
shutdown in interface ManagedService

getOrderLock

public Lock getOrderLock(String key)

createDistributedObject

public TopicProxy createDistributedObject(String name)
Specified by:
createDistributedObject in interface RemoteService

destroyDistributedObject

public void destroyDistributedObject(String objectId)
Specified by:
destroyDistributedObject in interface RemoteService

dispatchEvent

public void dispatchEvent(Object event,
                          Object listener)
Specified by:
dispatchEvent in interface EventPublishingService

getLocalTopicStats

public LocalTopicStatsImpl getLocalTopicStats(String name)

incrementPublishes

public void incrementPublishes(String topicName)

incrementReceivedMessages

public void incrementReceivedMessages(String topicName)

publishEvent

public void publishEvent(String name,
                         TopicEvent event)

addMessageListener

public String addMessageListener(String name,
                                 MessageListener listener)

removeMessageListener

public boolean removeMessageListener(String name,
                                     String registrationId)


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.