com.hazelcast.spi

## Interface GracefulShutdownAwareService

- All Known Implementing Classes:
    CRDTReplicationMigrationService

      public interface GracefulShutdownAwareService

  An interface that can be implemented by SPI services to participate in graceful shutdown process, such as moving their internal data to another node or releasing their allocated resources gracefully.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `onShutdown(long timeout, TimeUnit unit)` A hook method that's called during graceful shutdown to provide safety for data managed by this service.

- - ### Method Detail

    - #### onShutdown

          boolean onShutdown(long timeout,
                             TimeUnit unit)

      A hook method that's called during graceful shutdown to provide safety for data managed by this service. Shutdown process is blocked until this method returns or shutdown timeouts. If this method does not return in time, then it's considered as failed to gracefully shutdown.
      Parameters:
        `timeout` - timeout for graceful shutdown
        `unit` - time unit
      Returns:
        true if graceful shutdown is successful, false otherwise

Copyright © 2019. All rights reserved.