Home
last modified time | relevance | path

Searched refs:Futures (Results 1 – 25 of 42) sorted by relevance

12

/external/guava/guava-tests/test/com/google/common/util/concurrent/
DFuturesTest.java21 import static com.google.common.util.concurrent.Futures.allAsList;
22 import static com.google.common.util.concurrent.Futures.get;
23 import static com.google.common.util.concurrent.Futures.getUnchecked;
24 import static com.google.common.util.concurrent.Futures.immediateFailedFuture;
25 import static com.google.common.util.concurrent.Futures.immediateFuture;
26 import static com.google.common.util.concurrent.Futures.successfulAsList;
110 ListenableFuture<String> future = Futures.immediateFuture(DATA1); in testImmediateFuture()
117 ListenableFuture<String> future1 = Futures.immediateFuture(DATA1); in testMultipleImmediateFutures()
118 ListenableFuture<String> future2 = Futures.immediateFuture(DATA2); in testMultipleImmediateFutures()
128 Futures.immediateFailedFuture(exception); in testImmediateFailedFuture()
[all …]
DFutureCallbackTest.java41 Futures.addCallback(f, callback); in testSameThreadSuccess()
49 Futures.addCallback(f, callback, ex); in testExecutorSuccess()
59 Futures.addCallback(f, callback); in testSameThreadExecutionException()
80 Futures.addCallback(f, callback); in testCancel()
88 Futures.addCallback(f, callback); in testThrowErrorFromGet()
95 Futures.addCallback(f, callback); in testRuntimeExeceptionFromGet()
104 Futures.addCallback(future, callback); in testOnSuccessThrowsRuntimeException()
119 Futures.addCallback(future, callback); in testOnSuccessThrowsError()
142 Futures.addCallback(f, callback); in testWildcardFuture()
DFuturesTransformAsyncFunctionTest.java50 return Futures.transform(inputFuture, new ChainingFunction()); in buildChainingFuture()
163 BadFuture badInput = new BadFuture(Futures.immediateFuture(20)); in testFutureGetThrowsRuntimeException()
DFuturesTransformTest.java34 return Futures.transform(inputFuture, in buildChainingFuture()
/external/dagger2/compiler/src/it/producers-functional-tests/src/main/java/producerstest/
DSimpleProducerModule.java19 import com.google.common.util.concurrent.Futures;
67 return Futures.immediateFuture("future str"); in futureStr()
79 return Futures.immediateFuture("future str with arg"); in futureStrWithArg()
91 return Futures.immediateFuture("future str throwing exception"); in futureStrThrowingException()
103 return Futures.immediateFuture("future str with arg throwing exception"); in futureStrWithArgThrowingException()
123 return Futures.immediateFuture("future str with args"); in futureStrWithArgs()
130 return Futures.immediateFuture("str with args throwing exception"); in futureStrWithArgsThrowingException()
147 return Futures.immediateFuture("set of str element"); in setOfStrFutureElement()
152 return Futures.immediateFuture("set of str element throwing exception"); in setOfStrFutureElementThrowingException()
167 return Futures.immediateFuture("set of str element with arg"); in setOfStrFutureElementWithArg()
[all …]
DMultibindingProducerModule.java19 import com.google.common.util.concurrent.Futures;
36 return Futures.immediateFuture("foo"); in futureStr()
46 return Futures.<Set<String>>immediateFuture(ImmutableSet.of("foo1", "foo2")); in futureStrs()
DResponseProducerModule.java18 import com.google.common.util.concurrent.Futures;
27 return Futures.immediateFuture("Hello"); in greeting()
DDependentProducerModule.java20 import com.google.common.util.concurrent.Futures;
33 return Futures.immediateFuture(greetings); in greetings()
DDependedProducerModule.java20 import com.google.common.util.concurrent.Futures;
/external/dagger2/producers/src/main/java/dagger/producers/internal/
DProducers.java21 import com.google.common.util.concurrent.Futures;
52 return Futures.withFallback( in createFutureProduced()
53 Futures.transform( in createFutureProduced()
69 return Futures.immediateFuture(produced);
83 return Futures.transform(future, new Function<T, Set<T>>() {
99 return Futures.immediateFuture(provider.get());
109 return Futures.immediateFuture(value);
119 return Futures.immediateFailedFuture(throwable);
DSetProducer.java20 import com.google.common.util.concurrent.Futures;
76 return Futures.transform(Futures.allAsList(futureSets), new Function<List<Set<T>>, Set<T>>() { in compute()
DSetOfProducedProducer.java20 import com.google.common.util.concurrent.Futures;
78 return Futures.transform( in compute()
79 Futures.allAsList(futureProducedSets), in compute()
/external/guava/guava-tests/benchmark/com/google/common/util/concurrent/
DFuturesCombineBenchmark.java41 ListenableFuture<?> trigger = Futures.successfulAsList(futures); in combine()
44 return Futures.transform(trigger, new AsyncFunction<Object, V>() { in combine()
47 return Futures.immediateFuture(combiner.call()); in combine()
49 return Futures.immediateCancelledFuture(); in combine()
51 return Futures.immediateFailedFuture(e.getCause()); // OK to rethrow on Error in combine()
61 return Futures.combine(combiner, executor, futures);
82 futuresBuilder.add(Futures.immediateFuture(i));
97 futuresBuilder.add(Futures.immediateFailedFuture(new Exception("boom")));
/external/dagger2/producers/src/test/java/dagger/producers/internal/
DProducersTest.java18 import com.google.common.util.concurrent.Futures;
40 ListenableFuture<String> future = Futures.immediateFuture("monkey"); in createFutureProduced_success()
47 ListenableFuture<String> future = Futures.immediateFailedFuture(new RuntimeException("monkey")); in createFutureProduced_failure()
81 ListenableFuture<String> future = Futures.immediateFuture("monkey"); in createFutureSingletonSet_success()
88 ListenableFuture<String> future = Futures.immediateFailedFuture(new RuntimeException("monkey")); in createFutureSingletonSet_failure()
DAbstractProducerTest.java18 import com.google.common.util.concurrent.Futures;
82 return Futures.immediateFuture(i++); in get()
126 new DelegateProducer<>(null, Futures.immediateFuture(42)); in monitor_null()
/external/guava/guava/src/com/google/common/util/concurrent/
DAsyncSettableFuture.java45 private final ListenableFuture<V> dereferenced = Futures.dereference(nested);
67 return setFuture(Futures.immediateFuture(value)); in setValue()
76 return setFuture(Futures.<V>immediateFailedFuture(exception)); in setException()
/external/dagger2/producers/src/main/java/dagger/producers/monitoring/
DProducerMonitor.java19 import com.google.common.util.concurrent.Futures;
92 Futures.addCallback( in addCallbackTo()
/external/caliper/caliper/src/main/java/com/google/caliper/runner/
DExperimentingCaliperRun.java34 import com.google.common.util.concurrent.Futures;
62 final ListenableFuture<Object> nullFuture = Futures.immediateFuture(null);
218 ListenableFuture<?> previous = Futures.successfulAsList(pendingTrials); in scheduleTrials()
223 Futures.transform( in scheduleTrials()
232 previous = Futures.withFallback(current, FALLBACK_TO_NULL); in scheduleTrials()
/external/dagger2/compiler/src/it/producers-functional-tests/src/test/java/producerstest/
DDependentTest.java18 import com.google.common.util.concurrent.Futures;
58 return Futures.immediateFuture(3); in reuseBuilderWithDependentComponent()
/external/dagger2/compiler/src/it/producers-functional-tests/src/test/java/producerstest/builder/
DProductionComponentBuilderTest.java18 import com.google.common.util.concurrent.Futures;
74 return Futures.immediateFuture(value); in depComponent()
/external/dagger2/compiler/src/it/producers-functional-tests/src/test/java/producerstest/badexecutor/
DBadExecutorTest.java3 import com.google.common.util.concurrent.Futures;
28 return Futures.immediateFuture(42.0); in setUpComponent()
/external/guava/guava-tests/test/com/google/common/cache/
DCacheLoaderTest.java22 import com.google.common.util.concurrent.Futures;
67 return Futures.immediateFuture(new Object()); in testAsyncReload()
DTestingCacheLoaders.java22 import com.google.common.util.concurrent.Futures;
159 return Futures.immediateFuture(oldValue + 1);
/external/dagger2/compiler/src/main/java/dagger/internal/codegen/
DProducerFactoryGenerator.java29 import com.google.common.util.concurrent.Futures;
215 ClassName.fromClass(Futures.class), in write()
275 ClassName.fromClass(Futures.class), in futureSnippet()
362 ClassName.fromClass(Futures.class), in futureSnippet()
485 ClassName.fromClass(Futures.class),
/external/guava/guava/src/com/google/common/cache/
DCacheLoader.java26 import com.google.common.util.concurrent.Futures;
97 return Futures.immediateFuture(load(key)); in reload()

12