@PrivateApi public final class TerminatedLifecycleService extends Object implements LifecycleService
| Constructor and Description |
|---|
TerminatedLifecycleService() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public boolean isRunning()
LifecycleServiceisRunning in interface LifecycleServicepublic void shutdown()
LifecycleServiceLifecycleService.terminate(),
it waits for partition operations to be completed.shutdown in interface LifecycleServicepublic void terminate()
LifecycleServiceterminate in interface LifecycleServicepublic String addLifecycleListener(LifecycleListener lifecycleListener)
LifecycleServiceaddLifecycleListener in interface LifecycleServicelifecycleListener - the listener objectpublic boolean removeLifecycleListener(String registrationId)
LifecycleServiceremoveLifecycleListener in interface LifecycleServiceregistrationId - The listener id returned by LifecycleService.addLifecycleListener(LifecycleListener)Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.