Home
last modified time | relevance | path

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

12

/libcore/luni/src/test/java/libcore/java/lang/
DLambdaImplementationTest.java35 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/
DAbstractExecutorServiceTest.java20 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 …]
DForkJoinPoolTest.java17 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 …]
DExecutorCompletionServiceTest.java14 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()
DScheduledExecutorSubclassTest.java17 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 …]
DScheduledExecutorTest.java19 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 …]
DThreadPoolExecutorSubclassTest.java18 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 …]
DExecutorsTest.java20 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 …]
DThreadPoolExecutorTest.java19 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/
DExecutors.java381 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 …]
DExecutorService.java226 <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()
DAbstractExecutorService.java107 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()
DFutureTask.java103 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()
DCallable.java58 public interface Callable<V> { interface
DExecutorCompletionService.java126 private RunnableFuture<V> newTaskFor(Callable<V> task) { in newTaskFor()
180 public Future<V> submit(Callable<V> task) { in submit()
DCompletionService.java73 Future<V> submit(Callable<V> task); in submit()
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/
DExecutors.java120 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 …]
DFutureTask.java43 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/
DParameterMetadataTestClasses.java19 import java.util.concurrent.Callable;
94 Callable<String> anonymousClassObject = new Callable<String>() { in getAnonymousClassWith1ParameterConstructor()
/libcore/support/src/test/java/tests/support/
DSupport_Exec.java30 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/
DTestSSLSocketPair.java19 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/
DUnsafeTest.java22 import java.util.concurrent.Callable;
42 Callable<Object> callable = Executors.callable(new Runnable() { in test_getUnsafeForbiddenWithSystemCaller()
/libcore/luni/src/test/java/tests/security/
DSecureRandomTest.java21 import java.util.concurrent.Callable;
82 ecs.submit(new Callable<Void>() { in testSecureRandomThreadSafety()
/libcore/luni/src/test/java/libcore/java/security/
DMessageDigestTest.java25 import java.util.concurrent.Callable;
44 es.submit(new Callable<Void>() { in testMessageDigest_MultipleThreads_Misuse()
/libcore/luni/src/test/java/libcore/java/lang/reflect/
DClassLoaderReflectionTest.java28 import java.util.concurrent.Callable;
96 assertParameterizedType(types[0], Callable.class, aClass); in testGenericInterfaces()
155 class E implements Callable<A>, D<A> {

12