/** * Execute the runnable in the main thread of the underlying RPC endpoint. * * @param runnable Runnable to be executed in the main thread of the underlying RPC endpoint */ protected void runAsync(Runnable runnable) { ((MainThreadExecutable) self).runAsync(runnable); }
/** * Execute the callable in the main thread of the underlying RPC service, returning a future for * the result of the callable. If the callable is not completed within the given timeout, then * the future will be failed with a {@link java.util.concurrent.TimeoutException}. * * @param callable Callable to be executed in the main thread of the underlying rpc server * @param timeout Timeout for the callable to be completed * @param <V> Return type of the callable * @return Future for the result of the callable. */ protected <V> Future<V> callAsync(Callable<V> callable, Time timeout) { return ((MainThreadExecutable) self).callAsync(callable, timeout); }
/** * Execute the runnable in the main thread of the underlying RPC endpoint, with * a delay of the given number of milliseconds. * * @param runnable Runnable to be executed * @param delay The delay after which the runnable will be executed */ protected void scheduleRunAsync(Runnable runnable, long delay, TimeUnit unit) { ((MainThreadExecutable) self).scheduleRunAsync(runnable, unit.toMillis(delay)); }
@Override public void execute(@Nonnull Runnable runnable) { gateway.runAsync(runnable); } }
@Override public void execute(@Nonnull Runnable runnable) { gateway.runAsync(runnable); } }
@Override public void execute(@Nonnull Runnable runnable) { gateway.runAsync(runnable); } }
@Override public void execute(@Nonnull Runnable runnable) { gateway.runAsync(runnable); } }