public final class Operations extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Operations.CompletedFuture<T>
This class represents a
Future in the completed state with a fixed result. |
Constructor and Description |
---|
Operations() |
Modifier and Type | Method and Description |
---|---|
static Cancellable |
cancellable(Future<?> future)
Creates a
Cancellable operation handle for an ongoing process
or operation represented by a Future . |
static Cancellable |
nonCancellable()
Creates a
Cancellable operation handle for an ongoing process
or operation that cannot be cancelled. |
public static Cancellable cancellable(Future<?> future)
Cancellable
operation handle for an ongoing process
or operation represented by a Future
.future
- the result futurepublic static Cancellable nonCancellable()
Cancellable
operation handle for an ongoing process
or operation that cannot be cancelled. Attempts to cancel the operation
with this handle will have no effect.