Searched refs:ListenableFuture (Results 1 - 25 of 36) sorted by relevance

12

/external/guava/guava/src/com/google/common/util/concurrent/
H A DForwardingListenableFuture.java24 * A {@link ListenableFuture} which forwards all its method calls to another
37 implements ListenableFuture<V> {
43 protected abstract ListenableFuture<V> delegate();
56 * can pass in an already constructed {@link ListenableFuture}
63 private final ListenableFuture<V> delegate;
65 protected SimpleForwardingListenableFuture(ListenableFuture<V> delegate) {
70 protected final ListenableFuture<V> delegate() {
H A DForwardingListeningExecutorService.java39 public <T> ListenableFuture<T> submit(Callable<T> task) {
44 public ListenableFuture<?> submit(Runnable task) {
49 public <T> ListenableFuture<T> submit(Runnable task, T result) {
H A DService.java57 * initiated startup. Calling {@link ListenableFuture#get} will block
60 * the service fails to start, {@link ListenableFuture#get} will throw an
63 * ListenableFuture#get} returns immediately. Cancelling this future has
66 ListenableFuture<State> start();
98 * initiated shutdown. Calling {@link ListenableFuture#get} will block
101 * it has already finished stopping, {@link ListenableFuture#get} returns
104 ListenableFuture<State> stop();
H A DListeningExecutorService.java28 * An {@link ExecutorService} that returns {@link ListenableFuture} instances. To create an instance
37 * @return a {@code ListenableFuture} representing pending completion of the task
41 <T> ListenableFuture<T> submit(Callable<T> task);
44 * @return a {@code ListenableFuture} representing pending completion of the task
48 ListenableFuture<?> submit(Runnable task);
51 * @return a {@code ListenableFuture} representing pending completion of the task
55 <T> ListenableFuture<T> submit(Runnable task, T result);
60 * <p>All elements in the returned list must be {@link ListenableFuture} instances.
62 * @return A list of {@code ListenableFuture} instances representing the tasks, in the same
75 * <p>All elements in the returned list must be {@link ListenableFuture} instance
[all...]
H A DAsyncFunction.java25 * information, see {@link Futures#transform(ListenableFuture, AsyncFunction)}.
40 ListenableFuture<O> apply(I input) throws Exception;
H A DJdkFutureAdapters.java33 * modify those libraries to return {@code ListenableFuture} directly.
43 * ListenableFuture} functionality.
46 * ListenableFuture}, the returned future will emulate {@link
47 * ListenableFuture#addListener} by taking a thread from an internal,
51 * <p>Prefer to create {@code ListenableFuture} instances with {@link
55 * Future} instances to be upgraded to {@code ListenableFuture} after the
58 public static <V> ListenableFuture<V> listenInPoolThread(
60 if (future instanceof ListenableFuture<?>) {
61 return (ListenableFuture<V>) future;
67 static <V> ListenableFuture<
[all...]
H A DForwardingService.java37 @Override public ListenableFuture<State> start() {
45 @Override public ListenableFuture<State> stop() {
H A DListenableFuture.java34 * Most commonly, {@code ListenableFuture} is used as an input to another
46 * ListenableFuture<Result> future = service.query(name);
58 * Developers are encouraged to return {@code ListenableFuture} from their
60 * class. The way that they will create {@code ListenableFuture} instances
76 * is more efficient and reliable to create a {@code ListenableFuture} directly.
82 public interface ListenableFuture<V> extends Future<V> { interface in inherits:Future
H A DFutures.java68 * Creates a {@link CheckedFuture} out of a normal {@link ListenableFuture}
80 ListenableFuture<V> future, Function<Exception, X> mapper) {
85 * Creates a {@code ListenableFuture} which has its value set immediately upon
90 public static <V> ListenableFuture<V> immediateFuture(@Nullable V value) {
117 * Returns a {@code ListenableFuture} which has an exception set immediately
127 public static <V> ListenableFuture<V> immediateFailedFuture(
160 * <p>Returns a new {@code ListenableFuture} whose result is asynchronously
167 * ListenableFuture<RowKey> rowKeyFuture = indexService.lookUp(query);
168 * Function<RowKey, ListenableFuture<QueryResult>> queryFunction =
169 * new Function<RowKey, ListenableFuture<QueryResul
[all...]
H A DCheckedFuture.java28 * A {@code CheckedFuture} is a {@link ListenableFuture} that includes versions
39 * <p>This interface also extends the ListenableFuture interface to allow
53 extends ListenableFuture<V> {
H A DAbstractIdleService.java101 @Override public final ListenableFuture<State> start() {
117 @Override public final ListenableFuture<State> stop() {
H A DListenableFutureTask.java26 * A {@link FutureTask} that also implements the {@link ListenableFuture}
35 implements ListenableFuture<V> {
59 * {@code ListenableFuture<?> f = ListenableFutureTask.create(runnable,
H A DAbstractExecutionThreadService.java137 @Override public final ListenableFuture<State> start() {
153 @Override public final ListenableFuture<State> stop() {
H A DAbstractCheckedFuture.java27 * A delegating wrapper around a {@link ListenableFuture} that adds support for
40 protected AbstractCheckedFuture(ListenableFuture<V> delegate) {
/external/guava/guava-tests/test/com/google/common/util/concurrent/
H A DFuturesTest.java96 ListenableFuture<String> future = Futures.immediateFuture(DATA1);
103 ListenableFuture<String> future1 = Futures.immediateFuture(DATA1);
104 ListenableFuture<String> future2 = Futures.immediateFuture(DATA2);
113 ListenableFuture<String> future =
178 ListenableFuture<?> nullFuture = Futures.immediateFuture(null);
179 ListenableFuture<?> transformedFuture =
186 ListenableFuture<FooChild> future = Futures.immediateFuture(null);
198 * {@link ListenableFuture} variant of
218 ListenableFuture<Integer> immediateFuture = Futures.immediateFuture(4);
250 * {@link ListenableFuture} varian
[all...]
H A DForwardingListenableFutureTest.java29 private ListenableFuture<String> forwardingFuture;
40 protected ListenableFuture<String> delegate() {
H A DFuturesTransformTest.java24 * Unit tests for {@link Futures#transform(ListenableFuture, Function)}.
32 @Override protected ListenableFuture<String> buildChainingFuture(
33 ListenableFuture<Integer> inputFuture) {
H A DAbstractChainedListenableFutureTest.java39 protected ListenableFuture<T> resultFuture;
96 protected abstract ListenableFuture<T> buildChainingFuture(
97 ListenableFuture<Integer> inputFuture);
H A DFuturesTransformAsyncFunctionTest.java29 * Unit tests for {@link Futures#transform(ListenableFuture, AsyncFunction)}.
45 @Override protected ListenableFuture<String> buildChainingFuture(
46 ListenableFuture<Integer> inputFuture) {
59 public ListenableFuture<String> apply(Integer input) {
164 ListenableFuture<String> chain = buildChainingFuture(badInput);
178 protected BadFuture(ListenableFuture<Integer> delegate) {
H A DListenableFutureTester.java39 private final ListenableFuture<?> future;
42 public ListenableFutureTester(ListenableFuture<?> future) {
H A DJdkFutureAdaptersTest.java48 ListenableFuture<String> listenableFuture = immediateFuture(DATA1);
58 ListenableFuture<String> listenableFuture =
86 ListenableFuture<String> listenableFuture =
107 * A Future that doesn't implement ListenableFuture, useful for testing
184 * The compiler recognizes that "input instanceof ListenableFuture" is
189 + "if the input is already a ListenableFuture",
190 ListenableFuture.class.isInstance(input));
191 ListenableFuture<String> listenable = listenInPoolThread(input);
/external/guava/guava-testlib/src/com/google/common/util/concurrent/testing/
H A DMockFutureListener.java20 import com.google.common.util.concurrent.ListenableFuture;
39 private final ListenableFuture<?> future;
41 public MockFutureListener(ListenableFuture<?> future) {
H A DAbstractListenableFutureTest.java20 import com.google.common.util.concurrent.ListenableFuture;
34 * Abstract test case parent for anything implementing {@link ListenableFuture}.
44 protected ListenableFuture<Boolean> future;
65 protected abstract <V> ListenableFuture<V> createListenableFuture(
H A DAbstractCheckedFutureTest.java21 import com.google.common.util.concurrent.ListenableFuture;
59 protected <V> ListenableFuture<V> createListenableFuture(V value,
/external/guava/guava/src/com/google/common/cache/
H A DCacheLoader.java27 import com.google.common.util.concurrent.ListenableFuture;
75 public ListenableFuture<V> reload(K key, V oldValue) throws Exception {

Completed in 517 milliseconds

12