T- Type of result returned from the future
public class ListenableFutureAdapterTask<T> extends ListenableFutureTask<T>
ListenableFuture. This transfers the state (ie result, failure, or canceled) from the source future. In order for this translation to occur a thread is needed to notify potential listeners when the future completes. When
ListenableFutureTask.run()is invoked we will block (if delegate future is not complete) waiting for the result from the provided future. Completing with the same state once the provided future completes.
The most common way to use this class is to construct it with the future to adapt from, then provide this future to an executor to block waiting for the provided future to complete. If this is used for high quantities keep in mind a lot of the threads will idly be waiting for results, typically a native threadly pool may be a better option.
|Constructor and Description|
Constructs a new
|Modifier and Type||Method and Description|
getContainedCallable, getFailure, getFailure, getRunningStackTrace, isCompletedExceptionally, listener
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
callback, callback, callback, failureCallback, failureCallback, failureCallback, flatMap, flatMap, flatMap, flatMap, flatMapFailure, flatMapFailure, flatMapFailure, listener, listener, map, map, map, mapFailure, mapFailure, mapFailure, resultCallback, resultCallback, resultCallback, throwMap, throwMap, throwMap