/libcore/luni/src/test/java/libcore/java/lang/ |
D | LambdaImplementationTest.java | 35 import java.util.concurrent.Callable; 42 Callable<String> r1 = () -> "Hello World"; in testNonCapturingLambda() 44 assertLambdaImplementsInterfaces(r1, Callable.class); in testNonCapturingLambda() 45 assertLambdaMethodCharacteristics(r1, Callable.class); in testNonCapturingLambda() 49 List<Callable<String>> callables = new ArrayList<>(); in testNonCapturingLambda() 85 Callable<String> r1 = LambdaImplementationTest::staticMethod; in testStaticMethodReferenceLambda() 87 assertLambdaImplementsInterfaces(r1, Callable.class); in testStaticMethodReferenceLambda() 88 assertLambdaMethodCharacteristics(r1, Callable.class); in testStaticMethodReferenceLambda() 93 List<Callable<String>> callables = new ArrayList<>(); in testStaticMethodReferenceLambda() 104 Callable<String> r1 = o::toString; in testObjectMethodReferenceLambda() [all …]
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | AbstractExecutorServiceTest.java | 20 import java.util.concurrent.Callable; 189 e.submit((Callable) null); in testSubmitNullCallable() 200 final Callable<Void> awaiter = new CheckedCallable<Void>() { in testInterruptedSubmit() 232 Callable c = new Callable() { in testSubmitEE() 263 e.invokeAny(new ArrayList<Callable<String>>()); in testInvokeAny2() 275 List<Callable<Long>> l = new ArrayList<Callable<Long>>(); in testInvokeAny3() 276 l.add(new Callable<Long>() { in testInvokeAny3() 292 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny4() 309 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny5() 336 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>()); in testInvokeAll2() [all …]
|
D | ForkJoinPoolTest.java | 17 import java.util.concurrent.Callable; 485 final Callable callable = Executors.callable(new PrivilegedAction() { in testSubmitPrivilegedAction() 503 final Callable callable = in testSubmitPrivilegedExceptionAction() 522 final Callable callable = in testSubmitFailedPrivilegedExceptionAction() 562 Future<String> future = e.submit((Callable) null); in testSubmitNullCallable() 574 final Callable<Void> awaiter = new CheckedCallable<Void>() { in testInterruptedSubmit() 602 p.submit(new Callable() { in testSubmitEE() 632 e.invokeAny(new ArrayList<Callable<String>>()); in testInvokeAny2() 644 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny3() 660 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny4() [all …]
|
D | ExecutorCompletionServiceTest.java | 14 import java.util.concurrent.Callable; 67 Callable c = null; in testSubmitNPE() 97 Callable c = new StringTask(); in testTake() 111 Callable c = new StringTask(); in testTake2() 126 Callable c = new StringTask(); in testPoll1() 149 Callable c = new StringTask(); in testPoll2() 164 MyCallableFuture(Callable<V> c) { super(c); } in testNewTaskForCallable() 171 protected <T> RunnableFuture<T> newTaskFor(Callable<T> c) { in testNewTaskForCallable() 178 Callable<String> c = new StringTask(); in testNewTaskForCallable()
|
D | ScheduledExecutorSubclassTest.java | 17 import java.util.concurrent.Callable; 88 …protected <V> RunnableScheduledFuture<V> decorateTask(Callable<V> c, RunnableScheduledFuture<V> ta… in decorateTask() 128 Callable task = new CheckedCallable<Boolean>() { in testSchedule1() 936 e.invokeAny(new ArrayList<Callable<String>>()); in testInvokeAny2() 949 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny3() 966 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny4() 983 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny5() 1010 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>()); in testInvokeAll2() 1021 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAll3() 1037 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAll4() [all …]
|
D | ScheduledExecutorTest.java | 19 import java.util.concurrent.Callable; 71 Callable task = new CheckedCallable<Boolean>() { in testSchedule1() 885 e.invokeAny(new ArrayList<Callable<String>>()); in testInvokeAny2() 898 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny3() 915 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny4() 932 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny5() 959 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>()); in testInvokeAll2() 970 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAll3() 986 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAll4() 1005 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAll5() [all …]
|
D | ThreadPoolExecutorSubclassTest.java | 18 import java.util.concurrent.Callable; 54 final Callable<V> callable; 62 CustomTask(Callable<V> c) { in CustomTask() 68 callable = new Callable<V>() { in CustomTask() 153 protected <V> RunnableFuture<V> newTaskFor(Callable<V> c) { in newTaskFor() 669 Callable task = new CheckedCallable<Boolean>() { in testGetQueue() 735 Callable task = new CheckedCallable<Boolean>() { in testPurge() 1498 e.invokeAny(new ArrayList<Callable<String>>()); in testInvokeAny2() 1514 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny3() 1534 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny4() [all …]
|
D | ExecutorsTest.java | 20 import java.util.concurrent.Callable; 400 class CheckCCL implements Callable<Object> { 453 Callable task = Executors.privilegedCallable(new CheckCCL()); in testPrivilegedCallableWithNoPrivs() 532 Callable c = Executors.callable(new NoOpRunnable()); in testCallable1() 540 Callable c = Executors.callable(new NoOpRunnable(), one); in testCallable2() 548 Callable c = Executors.callable(new PrivilegedAction() { in testCallable3() 557 Callable c = Executors.callable(new PrivilegedExceptionAction() { in testCallable4() 567 Callable c = Executors.callable((Runnable) null); in testCallableNPE1() 577 Callable c = Executors.callable((Runnable) null, one); in testCallableNPE2() 587 Callable c = Executors.callable((PrivilegedAction) null); in testCallableNPE3() [all …]
|
D | ThreadPoolExecutorTest.java | 19 import java.util.concurrent.Callable; 554 Callable task = new CheckedCallable<Boolean>() { in testGetQueue() 620 Callable task = new CheckedCallable<Boolean>() { in testPurge() 1039 Callable task = new CheckedCallable<Boolean>() { in testInterruptedSubmit() 1505 e.invokeAny(new ArrayList<Callable<String>>()); in testInvokeAny2() 1521 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny3() 1541 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny4() 1561 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny5() 1594 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>()); in testInvokeAll2() 1608 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAll3() [all …]
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | Executors.java | 381 public static <T> Callable<T> callable(Runnable task, T result) { in callable() 394 public static Callable<Object> callable(Runnable task) { in callable() 407 public static Callable<Object> callable(final PrivilegedAction<?> action) { in callable() 410 return new Callable<Object>() { in callable() 422 public static Callable<Object> callable(final PrivilegedExceptionAction<?> action) { 425 return new Callable<Object>() { 433 public static <T> Callable<T> privilegedCallable(Callable<T> callable) { 443 public static <T> Callable<T> privilegedCallableUsingCurrentClassLoader(Callable<T> callable) { 454 private static final class RunnableAdapter<T> implements Callable<T> { 470 private static final class PrivilegedCallable<T> implements Callable<T> { [all …]
|
D | ExecutorService.java | 226 <T> Future<T> submit(Callable<T> task); in submit() 277 <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) in invokeAll() 308 <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, in invokeAll() 331 <T> T invokeAny(Collection<? extends Callable<T>> tasks) in invokeAny() 357 <T> T invokeAny(Collection<? extends Callable<T>> tasks, in invokeAny()
|
D | AbstractExecutorService.java | 107 protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable) { in newTaskFor() 137 public <T> Future<T> submit(Callable<T> task) { in submit() 147 private <T> T doInvokeAny(Collection<? extends Callable<T>> tasks, in doInvokeAny() 170 Iterator<? extends Callable<T>> it = tasks.iterator(); in doInvokeAny() 217 public <T> T invokeAny(Collection<? extends Callable<T>> tasks) in invokeAny() 227 public <T> T invokeAny(Collection<? extends Callable<T>> tasks, in invokeAny() 233 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) in invokeAll() 239 for (Callable<T> t : tasks) { in invokeAll() 259 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, in invokeAll() 269 for (Callable<T> t : tasks) in invokeAll()
|
D | FutureTask.java | 103 private Callable<V> callable; 133 public FutureTask(Callable<V> callable) { in FutureTask() 261 Callable<V> c = callable; in run() 304 Callable<V> c = callable; in runAndReset()
|
D | Callable.java | 58 public interface Callable<V> { interface
|
D | ExecutorCompletionService.java | 126 private RunnableFuture<V> newTaskFor(Callable<V> task) { in newTaskFor() 180 public Future<V> submit(Callable<V> task) { in submit()
|
D | CompletionService.java | 73 Future<V> submit(Callable<V> task); in submit()
|
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/ |
D | Executors.java | 120 public static <T> java.util.concurrent.Callable<T> callable(java.lang.Runnable task, T result) { in callable() 124 public static java.util.concurrent.Callable<java.lang.Object> callable( in callable() 129 public static java.util.concurrent.Callable<java.lang.Object> callable( in callable() 134 public static java.util.concurrent.Callable<java.lang.Object> callable( in callable() 139 public static <T> java.util.concurrent.Callable<T> privilegedCallable( in privilegedCallable() 140 java.util.concurrent.Callable<T> callable) { in privilegedCallable() 144 public static <T> java.util.concurrent.Callable<T> privilegedCallableUsingCurrentClassLoader( in privilegedCallableUsingCurrentClassLoader() 145 java.util.concurrent.Callable<T> callable) { in privilegedCallableUsingCurrentClassLoader() 222 public <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> task) { in submit() 231 java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks) in invokeAll() [all …]
|
D | FutureTask.java | 43 public FutureTask(java.util.concurrent.Callable<V> callable) { in FutureTask() 153 private java.util.concurrent.Callable<V> callable;
|
/libcore/luni/src/test/parameter_metadata/src/libcore/java/lang/reflect/parameter/ |
D | ParameterMetadataTestClasses.java | 19 import java.util.concurrent.Callable; 94 Callable<String> anonymousClassObject = new Callable<String>() { in getAnonymousClassWith1ParameterConstructor()
|
/libcore/support/src/test/java/tests/support/ |
D | Support_Exec.java | 30 import java.util.concurrent.Callable; 117 private static Callable<String> streamToStringCallable(final InputStream in) { in streamToStringCallable() 118 return new Callable<String>() { in streamToStringCallable()
|
/libcore/support/src/test/java/libcore/javax/net/ssl/ |
D | TestSSLSocketPair.java | 19 import java.util.concurrent.Callable; 79 Future s = executor.submit(new Callable<Void>() { in connect() 88 Future c = executor.submit(new Callable<Void>() { in connect()
|
/libcore/luni/src/test/java/libcore/sun/misc/ |
D | UnsafeTest.java | 22 import java.util.concurrent.Callable; 42 Callable<Object> callable = Executors.callable(new Runnable() { in test_getUnsafeForbiddenWithSystemCaller()
|
/libcore/luni/src/test/java/tests/security/ |
D | SecureRandomTest.java | 21 import java.util.concurrent.Callable; 82 ecs.submit(new Callable<Void>() { in testSecureRandomThreadSafety()
|
/libcore/luni/src/test/java/libcore/java/security/ |
D | MessageDigestTest.java | 25 import java.util.concurrent.Callable; 44 es.submit(new Callable<Void>() { in testMessageDigest_MultipleThreads_Misuse()
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
D | ClassLoaderReflectionTest.java | 28 import java.util.concurrent.Callable; 96 assertParameterizedType(types[0], Callable.class, aClass); in testGenericInterfaces() 155 class E implements Callable<A>, D<A> {
|