class LifecycleService(config, logger_extras=None)

Bases: object

LifecycleService allows you to shutdown, terminate, and listen to LifecycleEvent’s on HazelcastInstances.

logger = <logging.Logger object>
state = None

Add a listener object to listen for lifecycle events.

Parameters:on_lifecycle_change – (Function), function to be called when LifeCycle state is changed.
Returns:(str), id of the listener.

Removes a lifecycle listener.

Parameters:registration_id – (str), the id of the listener to be removed.
Returns:(bool), true if the listener is removed successfully, false otherwise.

Called when instance’s state changes.

Parameters:new_state – (Lifecycle State), the new state of the instance.