Class CancellableFuture<V>
java.lang.Object
com.hierynomus.protocol.commons.concurrent.AFuture<V>
com.hierynomus.protocol.commons.concurrent.CancellableFuture<V>
- All Implemented Interfaces:
Future<V>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AFuture
AFuture.Function<A,B> Nested classes/interfaces inherited from interface Future
Future.State -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CancellableFuture.CancelCallbackprivate final AtomicBooleanprivate final ReentrantReadWriteLock -
Constructor Summary
ConstructorsConstructorDescriptionCancellableFuture(AFuture<V> wrappedFuture, CancellableFuture.CancelCallback cc) -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Future
exceptionNow, resultNow, state
-
Field Details
-
wrappedFuture
-
callback
-
cancelled
-
lock
-
-
Constructor Details
-
CancellableFuture
-
-
Method Details
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
isCancelled
public boolean isCancelled() -
isDone
public boolean isDone() -
get
-
get
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
-