Interface AsynchronousCloseable

    • Method Detail

      • onClose

        CompletionStage<Void> onClose()
        Return a stage that will complete when closeAsync() is called and shutdown completes.
        Returns:
        a stage that will complete when shutdown is complete, never null
      • closeAsync

        CompletionStage<Void> closeAsync()
        Initiates a shutdown.
        Returns:
        a stage that will complete when shutdown is complete, never null
      • close

        default void close()

        Implemented by calling closeAsync() and blocking on the result. Should not be called on a non-blocking thread.

        Specified by:
        close in interface AutoCloseable