Interface AsyncCloseable

  • All Known Subinterfaces:
    AsyncProcess
    All Known Implementing Classes:
    AbstractAsyncCloseable, AsyncAccumulator

    public interface AsyncCloseable
    Describes methods that are used to handle exceptional behaviour or to handle closing.

    After close(), closeEx(Throwable) or close() is called, the following things should be done:

    • Resources held by an object should be freed
    • All pending asynchronous operations should be completed exceptionally
    All operations of this interface are idempotent.
    • Field Detail

      • STATIC

        static final Object STATIC
    • Method Detail

      • close

        default void close()
        Cancels the process.
      • closeEx

        void closeEx​(@NotNull
                     @NotNull Throwable e)
        Closes process exceptionally in case an exception is thrown while executing the given process.
        Parameters:
        e - exception that is used to close process with