Searched defs:callable (Results 1 - 25 of 74) sorted by relevance

123

/external/guava/guava/src/com/google/common/util/concurrent/
H A DAbstractListeningExecutorService.java45 @Override protected final <T> ListenableFutureTask<T> newTaskFor(Callable<T> callable) { argument
46 return ListenableFutureTask.create(callable);
H A DCallables.java49 * Wraps the given callable such that for the duration of {@link Callable#call} the thread that is
53 * @param callable The callable to wrap
55 * for each invocation of the wrapped callable.
57 static <T> Callable<T> threadRenaming(final Callable<T> callable, argument
60 checkNotNull(callable);
67 return callable.call();
84 * for each invocation of the wrapped callable.
H A DFakeTimeLimiter.java48 public <T> T callWithTimeout(Callable<T> callable, long timeoutDuration, argument
51 return callable.call(); // fooled you
H A DListenableFutureTask.java49 * @param callable the callable task
52 public static <V> ListenableFutureTask<V> create(Callable<V> callable) { argument
53 return new ListenableFutureTask<V>(callable);
73 ListenableFutureTask(Callable<V> callable) { argument
74 super(callable);
H A DListeningScheduledExecutorService.java46 Callable<V> callable, long delay, TimeUnit unit);
45 schedule( Callable<V> callable, long delay, TimeUnit unit) argument
H A DTimeLimiter.java91 * @param callable the Callable to execute
104 <T> T callWithTimeout(Callable<T> callable, long timeoutDuration, argument
H A DSimpleTimeLimiter.java100 Callable<Object> callable = new Callable<Object>() {
111 return callWithTimeout(callable, timeoutDuration, timeoutUnit,
120 public <T> T callWithTimeout(Callable<T> callable, long timeoutDuration, argument
122 checkNotNull(callable);
126 Future<T> future = executor.submit(callable);
H A DWrappingExecutorService.java58 protected abstract <T> Callable<T> wrapTask(Callable<T> callable); argument
66 Executors.callable(command, null));
H A DMoreExecutors.java575 Callable<V> callable, long delay, TimeUnit unit) {
576 ListenableFutureTask<V> task = ListenableFutureTask.create(callable);
875 @Override protected <T> Callable<T> wrapTask(Callable<T> callable) {
876 return Callables.threadRenaming(callable, nameSupplier);
905 @Override protected <T> Callable<T> wrapTask(Callable<T> callable) {
906 return Callables.threadRenaming(callable, nameSupplier);
574 schedule( Callable<V> callable, long delay, TimeUnit unit) argument
/external/junit/src/org/junit/rules/
H A DErrorCollector.java73 * Adds to the table the exception, if any, thrown from {@code callable}.
75 * {@code callable} threw an exception.
77 public Object checkSucceeds(Callable<Object> callable) { argument
79 return callable.call();
/external/guava/guava-testlib/test/com/google/common/testing/
H A DFakeTickerTest.java145 * Runs {@code callable} concurrently {@code numberOfThreads} times.
148 private void runConcurrentTest(int numberOfThreads, final Callable<Void> callable) argument
159 callable.call();
/external/webrtc/talk/app/webrtc/java/android/org/webrtc/
H A DThreadUtils.java157 * Post |callable| to |handler| and wait for the result.
159 public static <V> V invokeUninterruptibly(final Handler handler, final Callable<V> callable) { argument
168 result.value = callable.call();
/external/droiddriver/src/io/appium/droiddriver/util/
H A DInstrumentationUtils.java140 * Runs {@code callable} on the main thread on best-effort basis up to a time limit, which
144 * dd.runOnMainSyncTimeout 0"} on the am command line.</p>The {@code callable} may never run, for
147 public static <V> V runOnMainSyncWithTimeout(Callable<V> callable) { argument
149 final RunOnMainSyncFutureTask<V> futureTask = new RunOnMainSyncFutureTask<>(callable);
176 public RunOnMainSyncFutureTask(Callable<V> callable) { argument
177 super(callable);
/external/guice/core/src/com/google/inject/internal/
H A DProvisionListenerStackCallback.java63 public T provision(Errors errors, InternalContext context, ProvisionCallback<T> callable) argument
65 Provision provision = new Provision(errors, context, callable);
97 final ProvisionCallback<T> callable; field in class:ProvisionListenerStackCallback.Provision
103 public Provision(Errors errors, InternalContext context, ProvisionCallback<T> callable) { argument
104 this.callable = callable;
115 result = callable.call();
/external/guice/extensions/servlet/test/com/google/inject/servlet/
H A DContinuingRequestIntegrationTest.java200 @Inject OffRequestCallable callable; field in class:ContinuingRequestIntegrationTest.ContinuingServlet
211 Callable<String> task = ServletScopes.continueRequest(callable,
/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/shadows/
H A DProgressDialogTest.java127 Callable<ProgressDialog> callable) throws Exception {
131 dialog = callable.call();
125 assertLatestDialogsSet(CharSequence expectedTitle, CharSequence expectedMessage, boolean expectedIndeterminate, boolean expectedCancelable, DialogInterface.OnCancelListener expectedCancelListener, Callable<ProgressDialog> callable) argument
/external/guava/guava-testlib/src/com/google/common/util/concurrent/testing/
H A DSameThreadScheduledExecutorService.java142 return schedule(java.util.concurrent.Executors.callable(command),
176 public <V> ListenableScheduledFuture<V> schedule(final Callable<V> callable, argument
178 Preconditions.checkNotNull(callable, "callable must not be null!");
180 ListenableFuture<V> delegateFuture = submit(callable);
H A DTestingExecutors.java131 Callable<V> callable, long delay, TimeUnit unit) {
130 schedule( Callable<V> callable, long delay, TimeUnit unit) argument
/external/guice/core/test/com/google/inject/
H A DPerformanceComparison.java156 static void iterate(Callable<Foo> callable, String label) { argument
163 callable.call();
176 static void concurrentlyIterate(final Callable<Foo> callable, String label) { argument
187 validate(callable);
/external/guice/extensions/servlet/src/com/google/inject/servlet/
H A DGuiceFilter.java199 synchronized <T> T call(Callable<T> callable) throws Exception { argument
203 return callable.call();
H A DServletScopes.java183 * Wraps the given callable in a contextual callable that "continues" the
199 * <p>The returned callable will throw a {@link ScopingException} when called
202 * @param callable code to be executed in another thread, which depends on
207 * @return a callable that will invoke the given callable, making the request
214 public static <T> Callable<T> continueRequest(final Callable<T> callable, argument
233 .call(callable);
239 * Wraps the given callable in a contextual callable tha
261 transferRequest(Callable<T> callable) argument
267 transferHttpRequest(final Callable<T> callable) argument
279 transferNonHttpRequest(final Callable<T> callable) argument
323 scopeRequest(final Callable<T> callable, Map<Key<?>, Object> seedMap) argument
371 call(Callable<T> callable) argument
[all...]
/external/autotest/server/cros/dynamic_suite/
H A Djob_status_unittest.py593 def callable(x): function in function:StatusTest._prepareForReporting
596 record_entity = self.mox.CreateMock(callable)
/external/caliper/caliper/src/main/java/com/google/caliper/runner/
H A DStreamService.java334 /** Returns a callable that renames the the thread that the given callable runs in. */
335 private static <T> Callable<T> threadRenaming(final String name, final Callable<T> callable) { argument
337 checkNotNull(callable);
344 return callable.call();
/external/guava/guava-tests/test/com/google/common/util/concurrent/
H A DWrappingExecutorServiceTest.java182 protected <T> Callable<T> wrapTask(Callable<T> callable) { argument
183 return new WrappedCallable<T>(callable);
H A DWrappingScheduledExecutorServiceTest.java51 testExecutor.schedule(Executors.callable(DO_NOTHING), 5, TimeUnit.SECONDS);
97 protected <T> Callable<T> wrapTask(Callable<T> callable) { argument
98 return new WrappedCallable<T>(callable);
134 Callable<V> callable, long delay, TimeUnit unit) {
135 assertTrue(callable instanceof WrappedCallable);
133 schedule( Callable<V> callable, long delay, TimeUnit unit) argument

Completed in 1500 milliseconds

123