Class EndlessWriteFuture

    • Constructor Detail

      • EndlessWriteFuture

        public EndlessWriteFuture()
    • Method Detail

      • verify

        public IoWriteFuture verify​(long timeoutMillis,
                                    CancelOption... options)
                             throws java.io.IOException
        Description copied from interface: VerifiableFuture
        Wait and verify that the operation was successful
        Specified by:
        verify in interface VerifiableFuture<IoWriteFuture>
        Parameters:
        timeoutMillis - Wait timeout in milliseconds
        options - Optional CancelOptions defining the behavior on time-out or interrupt; ignored if the future is not Cancellable.
        Returns:
        The (same) future instance
        Throws:
        java.io.IOException - If failed to verify successfully on time
      • isDone

        public boolean isDone()
        Specified by:
        isDone in interface WaitableFuture
        Returns:
        true if the asynchronous operation is completed. Note: it is up to the caller to determine whether it was a successful or failed completion.
      • getId

        public java.lang.Object getId()
        Specified by:
        getId in interface WaitableFuture
        Returns:
        Some identifier useful as toString() value
      • awaitUninterruptibly

        public boolean awaitUninterruptibly​(long timeoutMillis,
                                            CancelOption... options)
        Description copied from interface: WaitableFuture
        Wait for the asynchronous operation to complete with the specified timeout uninterruptibly.
        Specified by:
        awaitUninterruptibly in interface WaitableFuture
        Parameters:
        timeoutMillis - Wait time in milliseconds
        options - Optional CancelOptions defining the behavior on time-out; ignored if the future is not Cancellable.
        Returns:
        true if the operation is finished.
      • await

        public boolean await​(long timeoutMillis,
                             CancelOption... options)
                      throws java.io.IOException
        Description copied from interface: WaitableFuture
        Wait for the asynchronous operation to complete with the specified timeout.
        Specified by:
        await in interface WaitableFuture
        Parameters:
        timeoutMillis - Wait time in milliseconds
        options - Optional CancelOptions defining the behavior on time-out or interrupt; ignored if the future is not Cancellable.
        Returns:
        true if the operation is completed.
        Throws:
        java.io.IOException - if failed - specifically InterruptedIOException if waiting was interrupted
      • isWritten

        public boolean isWritten()
        Specified by:
        isWritten in interface IoWriteFuture
        Returns:
        true if the write operation is finished successfully.
      • getException

        public java.lang.Throwable getException()
        Description copied from interface: HasException
        Returns the cause of the failure.
        Specified by:
        getException in interface HasException
        Returns:
        the Throwable of the failure, or null if not failed (yet).