com.hazelcast.client
Class LifecycleServiceImpl

java.lang.Object
  extended by com.hazelcast.client.LifecycleServiceImpl
All Implemented Interfaces:
LifecycleService

public final class LifecycleServiceImpl
extends Object
implements LifecycleService


Constructor Summary
LifecycleServiceImpl(HazelcastClient client)
           
 
Method Summary
 String addLifecycleListener(LifecycleListener lifecycleListener)
          Add listener object to listen lifecycle events.
 void fireLifecycleEvent(LifecycleEvent.LifecycleState lifecycleState)
           
 boolean isRunning()
          whether the instance is running
 boolean removeLifecycleListener(String registrationId)
          Remove lifecycle listener
 void shutdown()
          gracefully shutdowns HazelcastInstance.
 void terminate()
          terminate HazelcastInstance ungracefully.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LifecycleServiceImpl

public LifecycleServiceImpl(HazelcastClient client)
Method Detail

addLifecycleListener

public String addLifecycleListener(LifecycleListener lifecycleListener)
Description copied from interface: LifecycleService
Add listener object to listen lifecycle events.

Specified by:
addLifecycleListener in interface LifecycleService
Parameters:
lifecycleListener - Listener object
Returns:
listener id

removeLifecycleListener

public boolean removeLifecycleListener(String registrationId)
Description copied from interface: LifecycleService
Remove lifecycle listener

Specified by:
removeLifecycleListener in interface LifecycleService
Parameters:
registrationId - The listener id returned by LifecycleService.addLifecycleListener(LifecycleListener)
Returns:
true if removed successfully

fireLifecycleEvent

public void fireLifecycleEvent(LifecycleEvent.LifecycleState lifecycleState)

isRunning

public boolean isRunning()
Description copied from interface: LifecycleService
whether the instance is running

Specified by:
isRunning in interface LifecycleService
Returns:
true if instance is active and running

shutdown

public void shutdown()
Description copied from interface: LifecycleService
gracefully shutdowns HazelcastInstance. Different from LifecycleService.terminate(), waits partition operations to be completed.

Specified by:
shutdown in interface LifecycleService

terminate

public void terminate()
Description copied from interface: LifecycleService
terminate HazelcastInstance ungracefully. Does not wait partition operations, forces immediate shutdown.

Specified by:
terminate in interface LifecycleService


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