CallReturn invoke() throws Throwable { return new CallReturn(invokeMethod()); }
/** Invoke the call once without retrying. */ synchronized CallReturn invokeOnce() { try { if (retryInfo != null) { return processWaitTimeAndRetryInfo(); } // The number of times this invocation handler has ever been failed over // before this method invocation attempt. Used to prevent concurrent // failed method invocations from triggering multiple failover attempts. final long failoverCount = retryInvocationHandler.getFailoverCount(); try { return invoke(); } catch (Exception e) { if (LOG.isTraceEnabled()) { LOG.trace(toString(), e); } if (Thread.currentThread().isInterrupted()) { // If interrupted, do not retry. throw e; } retryInfo = retryInvocationHandler.handleException( method, callId, retryPolicy, counters, failoverCount, e); return processWaitTimeAndRetryInfo(); } } catch(Throwable t) { return new CallReturn(t); } }
return new CallReturn(lowerLayerAsyncGet.get(0, TimeUnit.SECONDS)); } finally { lowerLayerAsyncGet = null;
CallReturn invoke() throws Throwable { return new CallReturn(invokeMethod()); }
/** Invoke the call once without retrying. */ synchronized CallReturn invokeOnce() { try { if (retryInfo != null) { return processWaitTimeAndRetryInfo(); } // The number of times this invocation handler has ever been failed over // before this method invocation attempt. Used to prevent concurrent // failed method invocations from triggering multiple failover attempts. final long failoverCount = retryInvocationHandler.getFailoverCount(); try { return invoke(); } catch (Exception e) { if (LOG.isTraceEnabled()) { LOG.trace(toString(), e); } if (Thread.currentThread().isInterrupted()) { // If interrupted, do not retry. throw e; } retryInfo = retryInvocationHandler.handleException( method, callId, retryPolicy, counters, failoverCount, e); return processWaitTimeAndRetryInfo(); } } catch(Throwable t) { return new CallReturn(t); } }
return new CallReturn(lowerLayerAsyncGet.get(0, TimeUnit.SECONDS)); } finally { lowerLayerAsyncGet = null;