/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 | 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 | 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 | 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 | Callable.java | 58 public interface Callable<V> { interface
|
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 | ExecutorCompletionService.java | 126 private RunnableFuture<V> newTaskFor(Callable<V> task) { in newTaskFor() 180 public 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 …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | AbstractExecutorServiceTest.java | 46 import java.util.concurrent.Callable; 212 e.submit((Callable) null); in testSubmitNullCallable() 223 final Callable<Void> awaiter = new CheckedCallable<Void>() { in testInterruptedSubmit() 255 Callable c = new Callable() { in testSubmitEE() 286 e.invokeAny(new ArrayList<Callable<String>>()); in testInvokeAny2() 298 List<Callable<Long>> l = new ArrayList<>(); in testInvokeAny3() 299 l.add(new Callable<Long>() { in testInvokeAny3() 315 List<Callable<String>> l = new ArrayList<>(); in testInvokeAny4() 332 List<Callable<String>> l = new ArrayList<>(); in testInvokeAny5() 359 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>()); in testInvokeAll2() [all …]
|
D | ExecutorCompletionService9Test.java | 42 import java.util.concurrent.Callable; 61 Collection<Callable<Integer>> solvers) in solveAll() 74 Collection<Callable<Integer>> solvers) in solveAny() 113 Set<Callable<Integer>> solvers = Set.of( in testSolveAll() 130 Set<Callable<Integer>> solvers = Set.of( in testSolveAny()
|
D | ForkJoinPoolTest.java | 43 import java.util.concurrent.Callable; 503 final Callable callable = Executors.callable(new PrivilegedAction() { in testSubmitPrivilegedAction() 521 final Callable callable = in testSubmitPrivilegedExceptionAction() 540 final Callable callable = in testSubmitFailedPrivilegedExceptionAction() 580 Future<String> future = e.submit((Callable) null); in testSubmitNullCallable() 592 final Callable<Void> awaiter = new CheckedCallable<Void>() { in testInterruptedSubmit() 620 p.submit(new Callable() { in testSubmitEE() 650 e.invokeAny(new ArrayList<Callable<String>>()); in testInvokeAny2() 662 List<Callable<String>> l = new ArrayList<>(); in testInvokeAny3() 678 List<Callable<String>> l = new ArrayList<>(); in testInvokeAny4() [all …]
|
D | ExecutorsTest.java | 46 import java.util.concurrent.Callable; 423 class CheckCCL implements Callable<Object> { 476 Callable task = Executors.privilegedCallable(new CheckCCL()); in testPrivilegedCallableWithNoPrivs() 555 Callable c = Executors.callable(new NoOpRunnable()); in testCallable1() 563 Callable c = Executors.callable(new NoOpRunnable(), one); in testCallable2() 571 Callable c = Executors.callable(new PrivilegedAction() { in testCallable3() 580 Callable c = Executors.callable(new PrivilegedExceptionAction() { in testCallable4() 590 Callable c = Executors.callable((Runnable) null); in testCallableNPE1() 600 Callable c = Executors.callable((Runnable) null, one); in testCallableNPE2() 610 Callable c = Executors.callable((PrivilegedAction) null); in testCallableNPE3() [all …]
|
D | ExecutorCompletionServiceTest.java | 40 import java.util.concurrent.Callable; 90 cs.submit((Callable) null); in testSubmitNullCallable() 175 cs.submit(new Callable() { public String call() throws Exception { in testPollReturnsNull() 225 MyCallableFuture(Callable<V> c) { super(c); } in testNewTaskForCallable() 232 protected <T> RunnableFuture<T> newTaskFor(Callable<T> c) { in testNewTaskForCallable() 238 Callable<String> c = new StringTask(); in testNewTaskForCallable()
|
D | ScheduledExecutorTest.java | 45 import java.util.concurrent.Callable; 93 Callable task = new CheckedCallable<Boolean>() { in testSchedule1() 906 e.invokeAny(new ArrayList<Callable<String>>()); in testInvokeAny2() 919 List<Callable<String>> l = new ArrayList<>(); in testInvokeAny3() 936 List<Callable<String>> l = new ArrayList<>(); in testInvokeAny4() 953 List<Callable<String>> l = new ArrayList<>(); in testInvokeAny5() 980 List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>()); in testInvokeAll2() 991 List<Callable<String>> l = new ArrayList<>(); in testInvokeAll3() 1007 List<Callable<String>> l = new ArrayList<>(); in testInvokeAll4() 1026 List<Callable<String>> l = new ArrayList<>(); in testInvokeAll5() [all …]
|
/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/luni/src/test/java/libcore/java/util/concurrent/ |
D | ForkJoinTaskTest.java | 24 import java.util.concurrent.Callable; 60 Callable callable = () -> { return Integer.valueOf(42); }; in testAdaptToCallable() 79 Callable callable = () -> { throw new Exception("Test passed"); }; in testAdaptToCallableThrowsException()
|
/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()
|