@Override public <T> void remoteExecute(MethodCall action, long timeout, Handler<AsyncResult<T>> handler) { logTrace(() -> String.format("RemoteExecute action %s, handler %s", action, handler)); RequestOptions options = new RequestOptions() .setFlags(JGROUPS_FLAGS) .setMode(ResponseMode.GET_ALL) .setTimeout(timeout); try { NotifyingFuture<RspList<T>> notifyingFuture = this.<T>execute(action, options); notifyingFuture.setListener((future) -> vertx.executeBlocking((f) -> { try { RspList<T> rspList = future.get(); f.complete(futureDone(rspList)); } catch (Exception e) { f.fail(e); } }, handler)); } catch (Exception e) { handler.handle(Future.failedFuture(e)); } }
if (unordered) opt.setFlags(Message.OOB);
if (unordered) opt.setFlags(Message.OOB);
if (unordered) opt.setFlags(Message.OOB);
@Override public <T> T remoteExecute(MethodCall action, long timeout) { logTrace(() -> String.format("RemoteExecute sync action %s with timeout %s", action, timeout)); RequestOptions options = new RequestOptions() .setFlags(JGROUPS_FLAGS) .setMode(ResponseMode.GET_ALL) .setTimeout(timeout); try { NotifyingFuture<RspList<T>> notifyingFuture = this.<T>execute(action, options); RspList<T> rspList = notifyingFuture.get(timeout, TimeUnit.MILLISECONDS); return futureDone(rspList); } catch (Exception e) { throw new VertxException(e); } }
if (unordered) opt.setFlags(Message.OOB);
/** * {@inheritDoc} */ @Override public <T> T callMethodOnNode(String serviceName, String methodName, Object[] args, Class<?>[] types, long methodTimeout, ClusterNode targetNode, boolean unordered) throws Exception { if (!(targetNode instanceof ClusterNodeImpl)) { throw MESSAGES.invalidTargetNodeInstance(targetNode, ClusterNodeImpl.class); } boolean trace = ClusteringImplLogger.ROOT_LOGGER.isTraceEnabled(); MethodCall m = new MethodCall(serviceName + "." + methodName, args, types); if (trace) { ClusteringImplLogger.ROOT_LOGGER.tracef("callMethodOnNode( objName=%s, methodName=%s )", serviceName, methodName); } if (this.directlyInvokeLocal && this.me.equals(targetNode)) { return this.<T>invokeDirectly(serviceName, methodName, args, types, null, null); } RequestOptions opt = new RequestOptions(ResponseMode.GET_FIRST, methodTimeout, false, new NoHandlerForRPCRspFilter()); if (unordered) { opt.setFlags(Message.OOB); } try { return this.dispatcher.<T>callRemoteMethod(((ClusterNodeImpl) targetNode).getOriginalJGAddress(), m, opt); } catch (Exception e) { throw e; } catch (Error e) { throw e; } catch (Throwable e) { throw MESSAGES.caughtRemoteInvocationThrowable(e); } }
opt.setFlags(Message.OOB);
RequestOptions opt = new RequestOptions(ResponseMode.GET_ALL, methodTimeout, false, new NoHandlerForRPCRspFilter()); if (unordered) { opt.setFlags(Message.OOB);
RequestOptions opt = new RequestOptions(ResponseMode.GET_ALL, this.getMethodCallTimeout(), false, new NoHandlerForRPCRspFilter()); if (unordered) { opt.setFlags(Message.OOB);
RequestOptions opts = new RequestOptions(ResponseMode.GET_ALL, timeout).setFlags(Message.Flag.OOB);