R - Type of the result for the future.public interface GridNioFuture<R>
IgniteInternalFuture interface. Removed asynchronous
listen methods which require a valid grid kernal context.| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel()
Cancels this future.
|
R |
get()
Synchronously waits for completion of the operation and
returns operation result.
|
R |
get(long timeout)
Synchronously waits for completion of the operation for
up to the timeout specified and returns operation result.
|
R |
get(long timeout,
TimeUnit unit)
Synchronously waits for completion of the operation for
up to the timeout specified and returns operation result.
|
boolean |
isCancelled()
Returns
true if this operation was cancelled before it completed normally. |
boolean |
isDone()
Checks if operation is done.
|
void |
listenAsync(IgniteInClosure<? super GridNioFuture<R>> lsnr)
Registers listener closure to be asynchronously notified whenever future completes.
|
boolean |
messageThread() |
void |
messageThread(boolean msgThread)
Sets flag indicating that message send future was created in thread that was processing a message.
|
boolean |
skipRecovery() |
R get() throws IOException, IgniteCheckedException
IgniteInterruptedCheckedException - Subclass of IgniteCheckedException thrown if the wait was interrupted.IgniteFutureCancelledCheckedException - Subclass of IgniteCheckedException throws if operation was cancelled.IgniteCheckedException - If operation failed.IOException - If IOException occurred while performing operation.R get(long timeout) throws IOException, IgniteCheckedException
get(long, TimeUnit.MILLISECONDS).timeout - The maximum time to wait in milliseconds.IgniteInterruptedCheckedException - Subclass of IgniteCheckedException thrown if the wait was interrupted.IgniteFutureTimeoutCheckedException - Subclass of IgniteCheckedException thrown if the wait was timed out.IgniteFutureCancelledCheckedException - Subclass of IgniteCheckedException throws if operation was cancelled.IgniteCheckedException - If operation failed.IOException - If IOException occurred while performing operation.R get(long timeout, TimeUnit unit) throws IOException, IgniteCheckedException
timeout - The maximum time to wait.unit - The time unit of the timeout argument.IgniteInterruptedCheckedException - Subclass of IgniteCheckedException thrown if the wait was interrupted.IgniteFutureTimeoutCheckedException - Subclass of IgniteCheckedException thrown if the wait was timed out.IgniteFutureCancelledCheckedException - Subclass of IgniteCheckedException throws if operation was cancelled.IgniteCheckedException - If operation failed.IOException - If IOException occurred while performing operation.boolean cancel()
throws IgniteCheckedException
True if future was canceled (i.e. was not finished prior to this call).IgniteCheckedException - If cancellation failed.boolean isDone()
True if operation is done, false otherwise.boolean isCancelled()
true if this operation was cancelled before it completed normally.True if this operation was cancelled before it completed normally.void listenAsync(@Nullable IgniteInClosure<? super GridNioFuture<R>> lsnr)
lsnr - Listener closure to register. If not provided - this method is no-op.void messageThread(boolean msgThread)
msgThread - True if future was created in thread that is processing message.boolean messageThread()
True if future was created in thread that was processing message.boolean skipRecovery()
True if skip recovery for this operation.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC1 Release Date : February 17 2015