public final class LifecycleServiceImpl extends Object implements LifecycleService
LifecycleService
implementation for the client.Constructor and Description |
---|
LifecycleServiceImpl(HazelcastClientInstanceImpl client) |
Modifier and Type | Method and Description |
---|---|
String |
addLifecycleListener(LifecycleListener lifecycleListener)
Add a listener object to listen for lifecycle events.
|
void |
fireLifecycleEvent(LifecycleEvent.LifecycleState lifecycleState) |
boolean |
isRunning()
checks whether or not the instance is running
|
boolean |
removeLifecycleListener(String registrationId)
Removes a lifecycle listener
|
void |
setStarted() |
void |
shutdown()
gracefully shutdowns HazelcastInstance.
|
void |
terminate()
terminate HazelcastInstance ungracefully.
|
public LifecycleServiceImpl(HazelcastClientInstanceImpl client)
public String addLifecycleListener(LifecycleListener lifecycleListener)
LifecycleService
addLifecycleListener
in interface LifecycleService
lifecycleListener
- the listener objectpublic boolean removeLifecycleListener(String registrationId)
LifecycleService
removeLifecycleListener
in interface LifecycleService
registrationId
- the listener ID returned by LifecycleService.addLifecycleListener(LifecycleListener)
public void fireLifecycleEvent(LifecycleEvent.LifecycleState lifecycleState)
public void setStarted()
public boolean isRunning()
LifecycleService
isRunning
in interface LifecycleService
public void shutdown()
LifecycleService
LifecycleService.terminate()
,
it waits for partition operations to be completed.shutdown
in interface LifecycleService
public void terminate()
LifecycleService
terminate
in interface LifecycleService
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.