com.hazelcast.instance

## Class TerminatedLifecycleService

- java.lang.Object
- - com.hazelcast.instance.TerminatedLifecycleService

- All Implemented Interfaces:
    LifecycleService

      @PrivateApi
      public final class TerminatedLifecycleService
      extends Object
      implements LifecycleService

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TerminatedLifecycleService()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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 shuts down 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 shuts down HazelcastInstance. It's different from `LifecycleService.terminate()` in that it waits for partition operations to complete.
      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. Use `LifecycleService.shutdown()` for graceful 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 © 2019. All rights reserved.