Home
last modified time | relevance | path

Searched refs:future (Results 1 – 25 of 450) sorted by relevance

12345678910>>...18

/external/guava/guava-tests/test/com/google/common/util/concurrent/
DListenableFutureTester.java39 private final ListenableFuture<?> future; field in ListenableFutureTester
42 public ListenableFutureTester(ListenableFuture<?> future) { in ListenableFutureTester() argument
44 this.future = future; in ListenableFutureTester()
49 future.addListener(new Runnable() { in setUp()
56 assertFalse(future.isDone()); in setUp()
57 assertFalse(future.isCancelled()); in setUp()
66 assertTrue(future.isDone()); in testCompletedFuture()
67 assertFalse(future.isCancelled()); in testCompletedFuture()
70 assertTrue(future.isDone()); in testCompletedFuture()
71 assertFalse(future.isCancelled()); in testCompletedFuture()
[all …]
DAbstractFutureTest.java47 AbstractFuture<String> future = new AbstractFuture<String>() { in testException() local
53 ExecutionException ee1 = getExpectingExecutionException(future); in testException()
54 ExecutionException ee2 = getExpectingExecutionException(future); in testException()
67 InterruptibleFuture future = new InterruptibleFuture(); in testCancel_notDoneNoInterrupt() local
68 assertTrue(future.cancel(false)); in testCancel_notDoneNoInterrupt()
69 assertTrue(future.isCancelled()); in testCancel_notDoneNoInterrupt()
70 assertTrue(future.isDone()); in testCancel_notDoneNoInterrupt()
71 assertFalse(future.wasInterrupted); in testCancel_notDoneNoInterrupt()
75 InterruptibleFuture future = new InterruptibleFuture(); in testCancel_notDoneInterrupt() local
76 assertTrue(future.cancel(true)); in testCancel_notDoneInterrupt()
[all …]
DSettableFutureTest.java31 private SettableFuture<String> future; field in SettableFutureTest
38 future = SettableFuture.create(); in setUp()
39 tester = new ListenableFutureTester(future); in setUp()
45 future.get(5, TimeUnit.MILLISECONDS); in testDefaultState()
51 assertTrue(future.set("value")); in testSetValue()
56 assertTrue(future.setException(new Exception("failure"))); in testSetFailure()
62 future.setException(null); in testSetFailureNull()
66 assertFalse(future.isDone()); in testSetFailureNull()
67 assertTrue(future.setException(new Exception("failure"))); in testSetFailureNull()
72 assertTrue(future.cancel(true)); in testCancel()
DFuturesTest.java96 ListenableFuture<String> future = Futures.immediateFuture(DATA1); in testImmediateFuture() local
99 assertSame(DATA1, future.get(0L, TimeUnit.MILLISECONDS)); in testImmediateFuture()
113 ListenableFuture<String> future = in testImmediateFailedFuture() local
117 future.get(0L, TimeUnit.MILLISECONDS); in testImmediateFailedFuture()
128 CheckedFuture<String, MyException> future = Futures.immediateCheckedFuture( in testImmediateCheckedFuture() local
132 assertSame(DATA1, future.get(0L, TimeUnit.MILLISECONDS)); in testImmediateCheckedFuture()
133 assertSame(DATA1, future.checkedGet(0L, TimeUnit.MILLISECONDS)); in testImmediateCheckedFuture()
151 CheckedFuture<String, MyException> future = in testImmediateFailedCheckedFuture() local
155 future.get(0L, TimeUnit.MILLISECONDS); in testImmediateFailedCheckedFuture()
163 future.checkedGet(0L, TimeUnit.MILLISECONDS); in testImmediateFailedCheckedFuture()
[all …]
DMoreExecutorsTest.java72 Future<?> future = executor.submit(incrementTask); in testSameThreadExecutorServiceInThreadExecution()
73 assertTrue(future.isDone()); in testSameThreadExecutorServiceInThreadExecution()
83 ListenableFuture<?> future = executor.submit(incrementTask); in testSameThreadExecutorServiceInThreadExecution() local
84 assertTrue(future.isDone()); in testSameThreadExecutorServiceInThreadExecution()
85 assertListenerRunImmediately(future); in testSameThreadExecutorServiceInThreadExecution()
117 Future<Integer> future = futures.get(i); in testSameThreadExecutorInvokeAll() local
118 assertTrue("Task should have been run before being returned", future.isDone()); in testSameThreadExecutorInvokeAll()
119 assertEquals(i, future.get().intValue()); in testSameThreadExecutorInvokeAll()
139 Future<?> future = executor.submit(new Callable<Void>() { in testSameThreadExecutorServiceTermination()
155 assertTrue(future.isDone()); in testSameThreadExecutorServiceTermination()
[all …]
DAbstractListeningExecutorServiceTest.java61 Future<?> future = e.submit(task); in testExecuteRunnable() local
62 future.get(); in testExecuteRunnable()
71 Future<String> future = e.submit(new StringTask()); in testSubmitCallable() local
72 String result = future.get(); in testSubmitCallable()
81 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable() local
82 future.get(); in testSubmitRunnable()
83 assertTrue(future.isDone()); in testSubmitRunnable()
91 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2() local
92 String result = future.get(); in testSubmitRunnable2()
104 Future future = e.submit(Executors.callable( in testSubmitPrivilegedAction()
[all …]
/external/guava/guava-testlib/src/com/google/common/util/concurrent/testing/
DAbstractCheckedFutureTest.java70 final CheckedFuture<Boolean, ?> future = in testCheckedGetThrowsApplicationExceptionOnCancellation() local
73 assertFalse(future.isDone()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
74 assertFalse(future.isCancelled()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
79 future.cancel(true); in testCheckedGetThrowsApplicationExceptionOnCancellation()
84 future.checkedGet(); in testCheckedGetThrowsApplicationExceptionOnCancellation()
90 assertTrue(future.isDone()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
91 assertTrue(future.isCancelled()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
97 final CheckedFuture<Boolean, ?> future = in testCheckedGetThrowsApplicationExceptionOnInterruption() local
103 assertFalse(future.isDone()); in testCheckedGetThrowsApplicationExceptionOnInterruption()
104 assertFalse(future.isCancelled()); in testCheckedGetThrowsApplicationExceptionOnInterruption()
[all …]
DAbstractListenableFutureTest.java44 protected ListenableFuture<Boolean> future; field in AbstractListenableFutureTest
51 future = createListenableFuture(Boolean.TRUE, null, latch); in setUp()
74 assertFalse(future.isDone()); in testGetBlocksUntilValueAvailable()
75 assertFalse(future.isCancelled()); in testGetBlocksUntilValueAvailable()
85 assertSame(Boolean.TRUE, future.get()); in testGetBlocksUntilValueAvailable()
102 assertTrue(future.isDone()); in testGetBlocksUntilValueAvailable()
103 assertFalse(future.isCancelled()); in testGetBlocksUntilValueAvailable()
115 future.get(20, TimeUnit.MILLISECONDS); in testTimeoutOnGetWorksCorrectly()
131 assertFalse(future.isDone()); in testCanceledFutureThrowsCancellation()
132 assertFalse(future.isCancelled()); in testCanceledFutureThrowsCancellation()
[all …]
DMockFutureListener.java39 private final ListenableFuture<?> future; field in MockFutureListener
41 public MockFutureListener(ListenableFuture<?> future) { in MockFutureListener() argument
43 this.future = future; in MockFutureListener()
45 future.addListener(this, MoreExecutors.sameThreadExecutor()); in MockFutureListener()
64 Assert.assertEquals(expectedData, future.get()); in assertSuccess()
80 future.get(); in assertException()
/external/guava/guava/src/com/google/common/util/concurrent/
DFutures.java80 ListenableFuture<V> future, Function<Exception, X> mapper) { in makeChecked() argument
81 return new MappingCheckedFuture<V, X>(checkNotNull(future), mapper); in makeChecked()
91 SettableFuture<V> future = SettableFuture.create(); in immediateFuture() local
92 future.set(value); in immediateFuture()
93 return future; in immediateFuture()
106 SettableFuture<V> future = SettableFuture.create(); in immediateCheckedFuture() local
107 future.set(value); in immediateCheckedFuture()
108 return Futures.makeChecked(future, new Function<Exception, X>() { in immediateCheckedFuture()
130 SettableFuture<V> future = SettableFuture.create();
131 future.setException(throwable);
[all …]
DJdkFutureAdapters.java59 Future<V> future) { in listenInPoolThread() argument
60 if (future instanceof ListenableFuture<?>) { in listenInPoolThread()
61 return (ListenableFuture<V>) future; in listenInPoolThread()
63 return new ListenableFutureAdapter<V>(future); in listenInPoolThread()
68 Future<V> future, Executor executor) { in listenInPoolThread() argument
70 if (future instanceof ListenableFuture<?>) { in listenInPoolThread()
71 return (ListenableFuture<V>) future; in listenInPoolThread()
73 return new ListenableFutureAdapter<V>(future, executor); in listenInPoolThread()
DSimpleTimeLimiter.java126 Future<T> future = executor.submit(callable); in callWithTimeout() local
130 return future.get(timeoutDuration, timeoutUnit); in callWithTimeout()
132 future.cancel(true); in callWithTimeout()
136 return Uninterruptibles.getUninterruptibly(future, in callWithTimeout()
142 future.cancel(true); in callWithTimeout()
DUninterruptibles.java126 public static <V> V getUninterruptibly(Future<V> future) in getUninterruptibly() argument
132 return future.get(); in getUninterruptibly()
154 Future<V> future, long timeout, TimeUnit unit) in getUninterruptibly() argument
164 return future.get(remainingNanos, NANOSECONDS); in getUninterruptibly()
/external/guava/guava-tests/test/com/google/common/testing/
DGcFinalizationTest.java39 final SettableFuture<Void> future = SettableFuture.create(); in testAwaitDone_Future() local
41 protected void finalize() { future.set(null); } in testAwaitDone_Future()
44 GcFinalization.awaitDone(future); in testAwaitDone_Future()
45 assertTrue(future.isDone()); in testAwaitDone_Future()
46 assertFalse(future.isCancelled()); in testAwaitDone_Future()
50 final SettableFuture<Void> future = SettableFuture.create(); in testAwaitDone_Future_Cancel() local
52 protected void finalize() { future.cancel(false); } in testAwaitDone_Future_Cancel()
55 GcFinalization.awaitDone(future); in testAwaitDone_Future_Cancel()
56 assertTrue(future.isDone()); in testAwaitDone_Future_Cancel()
57 assertTrue(future.isCancelled()); in testAwaitDone_Future_Cancel()
[all …]
/external/icu4c/data/locales/
Des_419.txt63 day-future{
69 hour-future{
75 minute-future{
81 month-future{
87 second-future{
93 week-future{
99 year-future{
Dur.txt223 day-future{
238 hour-future{
253 minute-future{
268 month-future{
283 second-future{
298 week-future{
313 year-future{
Dte.txt313 day-future{
328 hour-future{
343 minute-future{
358 month-future{
373 second-future{
388 week-future{
403 year-future{
Dam.txt283 day-future{
298 hour-future{
313 minute-future{
328 month-future{
343 second-future{
358 week-future{
373 year-future{
Dkk.txt206 day-future{
215 hour-future{
224 minute-future{
233 month-future{
242 second-future{
251 week-future{
260 year-future{
Dmr.txt387 day-future{
402 hour-future{
417 minute-future{
432 month-future{
447 second-future{
462 week-future{
477 year-future{
Dgu.txt347 day-future{
362 hour-future{
377 minute-future{
392 month-future{
407 second-future{
422 week-future{
437 year-future{
Dkn.txt311 day-future{
326 hour-future{
341 minute-future{
356 month-future{
371 second-future{
386 week-future{
401 year-future{
Dta.txt392 day-future{
407 hour-future{
422 minute-future{
437 month-future{
452 second-future{
467 week-future{
482 year-future{
Dfr_CA.txt151 day-future{
159 hour-future{
167 minute-future{
175 month-future{
183 second-future{
193 week-future{
201 year-future{
/external/guava/guava-testlib/src/com/google/common/testing/
DGcFinalization.java115 public static void awaitDone(Future<?> future) { in awaitDone() argument
116 if (future.isDone()) { in awaitDone()
123 if (future.isDone()) { in awaitDone()
128 future.get(1L, SECONDS); in awaitDone()

12345678910>>...18