com.hazelcast.instance
Class TerminatedLifecycleService

java.lang.Object
  extended by com.hazelcast.instance.TerminatedLifecycleService
All Implemented Interfaces:
LifecycleService

public final class TerminatedLifecycleService
extends Object
implements LifecycleService


Constructor Summary
TerminatedLifecycleService()
           
 
Method Summary
 String addLifecycleListener(LifecycleListener lifecycleListener)
          Add a listener object to listen for lifecycle events.
 boolean isRunning()
          checks whether or not the instance is running
 boolean removeLifecycleListener(String registrationId)
          Removes a 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

TerminatedLifecycleService

public TerminatedLifecycleService()
Method Detail

isRunning

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

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

shutdown

public void shutdown()
Description copied from interface: LifecycleService
gracefully shutdowns HazelcastInstance. Different from LifecycleService.terminate(), it waits for 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 for partition operations, forces immediate shutdown.

Specified by:
terminate in interface LifecycleService

addLifecycleListener

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

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

removeLifecycleListener

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

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


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