Constructor and Description |
---|
CallableTaskWrapper(Callable<T> callableTask)
CTOR.
|
Modifier and Type | Method and Description |
---|---|
T |
call() |
boolean |
cancel(boolean mayInterruptIfRunning)
This method will block waiting if the callbale thread is still executing and the "mayInterruptIfRunning"
flag is set; this method will return when:
The callbale thread is done executing
The current thread got interrupted; no exception will be thrown and instead the interrupted flag will
be set
|
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
setFuture(Future<T> feature) |
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled
in interface Future<T>
public boolean isDone()
public T get() throws InterruptedException, ExecutionException
get
in interface Future<T>
InterruptedException
ExecutionException
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<T>
InterruptedException
ExecutionException
TimeoutException
Copyright © 1970 The Apache Software Foundation. All rights reserved.