Package org.pipecraft.infra.concurrent
Class SettableListenableFuture<T>
- java.lang.Object
-
- com.google.common.util.concurrent.internal.InternalFutureFailureAccess
-
- com.google.common.util.concurrent.AbstractFuture<T>
-
- org.pipecraft.infra.concurrent.SettableListenableFuture<T>
-
- Type Parameters:
T- The data type of the Future's value
- All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<T>,Future<T>
public class SettableListenableFuture<T> extends com.google.common.util.concurrent.AbstractFuture<T>The future implementation to be used in cases where a class is responsible for setting the Future's outcome (value/exception), and the future should be aListenableFuture. Notes: 1) The implementation should not expose this class through its API, and should expose it asListenableFuture. 2) This class should not be used in cases where the ListenableFuture doesn't need to be created and managed (e.g. when usingListeningExecutorService).- Author:
- Eyal Schneider
-
-
Constructor Summary
Constructors Constructor Description SettableListenableFuture()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanset(T value)booleansetException(Throwable throwable)
-