IoFuture that represents an immediately-successful operation.
| Modifier and Type | Field and Description |
|---|---|
| private final T |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public <A> IoFuture | addNotifier(final IoFuture.
the notifier to be called notifier,the attachment to pass in to the notifier attachment)Implements org. Add a notifier to be called when this operation is complete. |
| public IoFuture. | |
| public IoFuture. | await(final long
the amount of time to wait time, final TimeUnit the time unit timeUnit)Implements org. Wait for the operation to complete, with a timeout. |
| public IoFuture. | awaitInterruptibly()
Implements org. Wait for the operation to complete. |
| public IoFuture. | awaitInterruptibly(final long
the amount of time to wait time, final TimeUnit the time unit timeUnit)Implements org. Wait for the operation to complete, with a timeout. |
| public IoFuture | |
| public T | |
| public IOException | |
| public T | |
| public IoFuture. |
| result | back to summary |
|---|---|
| private final T result | |
| FinishedIoFuture | back to summary |
|---|---|
| public FinishedIoFuture(T result) Create an instance.
| |
| addNotifier | back to summary |
|---|---|
| public <A> IoFuture Implements org. Doc from org. Add a notifier to be called when this operation is complete. If the operation is already complete, the notifier is called immediately, possibly in the caller's thread. The given attachment is provided to the notifier. | |
| await | back to summary |
|---|---|
| public IoFuture. Implements org. Doc from org. Wait for the operation to complete. This method will block until the status changes from | |
| await | back to summary |
|---|---|
| public IoFuture. Implements org. Doc from org. Wait for the operation to complete, with a timeout. This method will block until the status changes from
| |
| awaitInterruptibly | back to summary |
|---|---|
| public IoFuture. Implements org. Doc from org. Wait for the operation to complete. This method will block until the status changes from
| |
| awaitInterruptibly | back to summary |
|---|---|
| public IoFuture. Implements org. Doc from org. Wait for the operation to complete, with a timeout. This method will block until the status changes from
| |
| cancel | back to summary |
|---|---|
| public IoFuture Implements org. Cancel the operation. Since this operation is always complete, this is a no-op.
| |
| get | back to summary |
|---|---|
| public T get() throws IOException, CancellationException Implements org. Doc from org. Get the result of the operation. If the operation is not complete, blocks until the operation completes. If the operation fails, or has already failed at the time this method is called, the failure reason is thrown.
| |
| getException | back to summary |
|---|---|
| public IOException getException() throws IllegalStateException Implements org. Doc from org. Get the failure reason.
| |
| getInterruptibly | back to summary |
|---|---|
| public T getInterruptibly() throws IOException, InterruptedException, CancellationException Implements org. Doc from org. Get the result of the operation. If the operation is not complete, blocks until the operation completes. If the operation fails, or has already failed at the time this method is called, the failure reason is thrown. If the current thread is interrupted while waiting, an exception is thrown.
| |
| getStatus | back to summary |
|---|---|
| public IoFuture. Implements org. Doc from org. Get the current status. | |