public void sendRequest(Buffer data) throws Exception { try { corr.sendUnicastRequest(target, data, options.mode() == ResponseMode.GET_NONE? null : this, this.options); } catch(Exception ex) { corrDone(); throw ex; } }
corr.sendUnicastRequest(dest, data, null, opts); return null;
/** * Sends a unicast message to the target defined by msg.getDest() and returns a future * @param dest the target to which to send the unicast message. Must not be null. * @param data the payload to send * @param opts the options * @return CompletableFuture<T> A future from which the result can be fetched, or null if the call was asynchronous * @throws Exception If there was problem sending the request, processing it at the receiver, or processing * it at the sender. {@link java.util.concurrent.Future#get()} will throw this exception */ public <T> CompletableFuture<T> sendMessageWithFuture(Address dest, Buffer data, RequestOptions opts) throws Exception { if(dest == null) throw new IllegalArgumentException("message destination is null, cannot send message"); if(opts == null) { log.warn("request options were null, using default of sync"); opts=RequestOptions.SYNC(); } rpc_stats.add(RpcStats.Type.UNICAST, dest, opts.mode() != ResponseMode.GET_NONE, 0); if(opts.mode() == ResponseMode.GET_NONE) { corr.sendUnicastRequest(dest, data, null, opts); return null; } // if we get here, the RPC is synchronous UnicastRequest<T> req=new UnicastRequest<>(corr, dest, opts); req.execute(data, false); return req; }
public void sendRequest(Buffer data) throws Exception { try { corr.sendUnicastRequest(target, data, options.mode() == ResponseMode.GET_NONE? null : this, this.options); } catch(Exception ex) { corrDone(); throw ex; } }
corr.sendUnicastRequest(dest, data, null, opts); return null;
/** * Sends a unicast message to the target defined by msg.getDest() and returns a future * @param dest the target to which to send the unicast message. Must not be null. * @param data the payload to send * @param opts the options * @return CompletableFuture<T> A future from which the result can be fetched, or null if the call was asynchronous * @throws Exception If there was problem sending the request, processing it at the receiver, or processing * it at the sender. {@link java.util.concurrent.Future#get()} will throw this exception */ public <T> CompletableFuture<T> sendMessageWithFuture(Address dest, Buffer data, RequestOptions opts) throws Exception { if(dest == null) throw new IllegalArgumentException("message destination is null, cannot send message"); if(opts == null) { log.warn("request options were null, using default of sync"); opts=RequestOptions.SYNC(); } rpc_stats.add(RpcStats.Type.UNICAST, dest, opts.mode() != ResponseMode.GET_NONE, 0); if(opts.mode() == ResponseMode.GET_NONE) { corr.sendUnicastRequest(dest, data, null, opts); return null; } // if we get here, the RPC is synchronous UnicastRequest<T> req=new UnicastRequest<>(corr, dest, opts); req.execute(data, false); return req; }