@Override public void execute(@Nonnull Runnable runnable) { gateway.runAsyncWithoutFencing(runnable); } }
/** * Run the given callable in the main thread of the RpcEndpoint without checking the fencing * token. This allows to run operations outside of the fencing token scope. * * @param callable to run in the main thread of the rpc endpoint without checkint the fencing token. * @param timeout for the operation. * @return Future containing the callable result. */ protected <V> CompletableFuture<V> callAsyncWithoutFencing(Callable<V> callable, Time timeout) { if (rpcServer instanceof FencedMainThreadExecutable) { return ((FencedMainThreadExecutable) rpcServer).callAsyncWithoutFencing(callable, timeout); } else { throw new RuntimeException("FencedRpcEndpoint has not been started with a FencedMainThreadExecutable RpcServer."); } }
/** * Run the given callable in the main thread of the RpcEndpoint without checking the fencing * token. This allows to run operations outside of the fencing token scope. * * @param callable to run in the main thread of the rpc endpoint without checkint the fencing token. * @param timeout for the operation. * @return Future containing the callable result. */ protected <V> CompletableFuture<V> callAsyncWithoutFencing(Callable<V> callable, Time timeout) { if (rpcServer instanceof FencedMainThreadExecutable) { return ((FencedMainThreadExecutable) rpcServer).callAsyncWithoutFencing(callable, timeout); } else { throw new RuntimeException("FencedRpcEndpoint has not been started with a FencedMainThreadExecutable RpcServer."); } }
@Override public void execute(@Nonnull Runnable runnable) { gateway.runAsyncWithoutFencing(runnable); } }
/** * Run the given callable in the main thread of the RpcEndpoint without checking the fencing * token. This allows to run operations outside of the fencing token scope. * * @param callable to run in the main thread of the rpc endpoint without checkint the fencing token. * @param timeout for the operation. * @return Future containing the callable result. */ protected <V> CompletableFuture<V> callAsyncWithoutFencing(Callable<V> callable, Time timeout) { if (rpcServer instanceof FencedMainThreadExecutable) { return ((FencedMainThreadExecutable) rpcServer).callAsyncWithoutFencing(callable, timeout); } else { throw new RuntimeException("FencedRpcEndpoint has not been started with a FencedMainThreadExecutable RpcServer."); } }
@Override public void execute(@Nonnull Runnable runnable) { gateway.runAsyncWithoutFencing(runnable); } }
/** * Run the given runnable in the main thread of the RpcEndpoint without checking the fencing * token. This allows to run operations outside of the fencing token scope. * * @param runnable to execute in the main thread of the rpc endpoint without checking the fencing token. */ protected void runAsyncWithoutFencing(Runnable runnable) { if (rpcServer instanceof FencedMainThreadExecutable) { ((FencedMainThreadExecutable) rpcServer).runAsyncWithoutFencing(runnable); } else { throw new RuntimeException("FencedRpcEndpoint has not been started with a FencedMainThreadExecutable RpcServer."); } }
/** * Run the given runnable in the main thread of the RpcEndpoint without checking the fencing * token. This allows to run operations outside of the fencing token scope. * * @param runnable to execute in the main thread of the rpc endpoint without checking the fencing token. */ protected void runAsyncWithoutFencing(Runnable runnable) { if (rpcServer instanceof FencedMainThreadExecutable) { ((FencedMainThreadExecutable) rpcServer).runAsyncWithoutFencing(runnable); } else { throw new RuntimeException("FencedRpcEndpoint has not been started with a FencedMainThreadExecutable RpcServer."); } }
/** * Run the given runnable in the main thread of the RpcEndpoint without checking the fencing * token. This allows to run operations outside of the fencing token scope. * * @param runnable to execute in the main thread of the rpc endpoint without checking the fencing token. */ protected void runAsyncWithoutFencing(Runnable runnable) { if (rpcServer instanceof FencedMainThreadExecutable) { ((FencedMainThreadExecutable) rpcServer).runAsyncWithoutFencing(runnable); } else { throw new RuntimeException("FencedRpcEndpoint has not been started with a FencedMainThreadExecutable RpcServer."); } }