/** * The timeout (in milliseconds) for blocking updates */ public long getTimeout() { return call_options.timeout(); }
/** * Sets the cluster call timeout (until all acks have been received) * * @param timeout * The timeout (in milliseconds) for blocking updates */ public void setTimeout(long timeout) { call_options.timeout(timeout); }
public T execute(Buffer data, boolean block_for_results) throws Exception { if(corr == null) return null; sendRequest(data); if(!block_for_results || options.mode() == ResponseMode.GET_NONE) return null; long timeout=options.timeout(); return timeout > 0? waitForCompletion(options.timeout(), TimeUnit.MILLISECONDS) : waitForCompletion(); }
@Override public T get() throws InterruptedException, ExecutionException { try { // Wait at most for the configured timeout // If the message was dropped by the receiver, this would otherwise block forever return super.get(super.options.timeout(), TimeUnit.MILLISECONDS); } catch (TimeoutException e) { // Auto-cancel on timeout this.cancel(true); throw new CancellationException(e.getLocalizedMessage()); } }
/** * Sets the cluster call timeout (until all acks have been received) * * @param timeout * The timeout (in milliseconds) for blocking updates */ public void setTimeout(long timeout) { call_options.timeout(timeout); }
/** * The timeout (in milliseconds) for blocking updates */ public long getTimeout() { return call_options.timeout(); }
public T execute(Buffer data, boolean block_for_results) throws Exception { if(corr == null) return null; sendRequest(data); if(!block_for_results || options.mode() == ResponseMode.GET_NONE) return null; long timeout=options.timeout(); return timeout > 0? waitForCompletion(options.timeout(), TimeUnit.MILLISECONDS) : waitForCompletion(); }
@Override public T get() throws InterruptedException, ExecutionException { try { // Wait at most for the configured timeout // If the message was dropped by the receiver, this would otherwise block forever return super.get(super.options.timeout(), TimeUnit.MILLISECONDS); } catch (TimeoutException e) { // Auto-cancel on timeout this.cancel(true); throw new CancellationException(e.getLocalizedMessage()); } }