public T get(long duration, TimeUnit units) throws InterruptedException, TimeoutException, ExecutionException { if (!latch.await(duration, units)) { // whenever timeout occurs, continuous timeout counter will increase by 1. MemcachedConnection.opTimedOut(op); throw new CheckedOperationTimeoutException( "Timed out waiting for operation. >" + duration + " " + units, op); } else { // continuous timeout counter will be reset MemcachedConnection.opSucceeded(op); } if (op != null && op.hasErrored()) { throw new ExecutionException(op.getException()); } if (op != null && op.isCancelled()) { throw new ExecutionException(new RuntimeException(op.getCancelCause())); } return objRef.get(); }
public T get(long duration, TimeUnit units) throws InterruptedException, TimeoutException, ExecutionException { if (!latch.await(duration, units)) { // whenever timeout occurs, continuous timeout counter will increase by 1. MemcachedConnection.opTimedOut(op); throw new CheckedOperationTimeoutException( "Timed out waiting for operation. >" + duration + " " + units, op); } else { // continuous timeout counter will be reset MemcachedConnection.opSucceeded(op); } if (op != null && op.hasErrored()) { throw new ExecutionException(op.getException()); } if (op != null && op.isCancelled()) { throw new ExecutionException(new RuntimeException(op.getCancelCause())); } return objRef.get(); }
@Override public T get(long duration, TimeUnit units) throws InterruptedException, TimeoutException, ExecutionException { if (!latch.await(duration, units)) { for (Operation op : ops) { MemcachedConnection.opTimedOut(op); } throw new CheckedOperationTimeoutException("Timed out waiting for b+tree get bulk operation", ops); } else { for (Operation op : ops) { MemcachedConnection.opSucceeded(op); } } for (Operation op : ops) { if (op != null && op.hasErrored()) { throw new ExecutionException(op.getException()); } if (op.isCancelled()) { throw new ExecutionException(new RuntimeException(op.getCancelCause())); } } return result; }
@Override public Boolean get(long duration, TimeUnit units) throws InterruptedException, TimeoutException, ExecutionException { if (!blatch.await(duration, units)) { // whenever timeout occurs, continuous timeout counter will increase by 1. for (Operation op : ops) { MemcachedConnection.opTimedOut(op); } throw new CheckedOperationTimeoutException( "Timed out waiting for operation. >" + duration + " " + units, ops); } else { // continuous timeout counter will be reset for (Operation op : ops) { MemcachedConnection.opSucceeded(op); } } for (Operation op : ops) { if (op != null && op.hasErrored()) { throw new ExecutionException(op.getException()); } if (op != null && op.isCancelled()) { throw new ExecutionException(new RuntimeException(op.getCancelCause())); } } return flushResult.get(); }
@Override public List<SMGetElement<T>> get(long duration, TimeUnit units) throws InterruptedException, TimeoutException, ExecutionException { if (!blatch.await(duration, units)) { for (Operation op : ops) { MemcachedConnection.opTimedOut(op); } throw new CheckedOperationTimeoutException( "Timed out waiting for operation >" + duration + " " + units, ops); } else { // continuous timeout counter will be reset for (Operation op : ops) { MemcachedConnection.opSucceeded(op); } } for (Operation op : ops) { if (op != null && op.hasErrored()) { throw new ExecutionException(op.getException()); } if (op.isCancelled()) { throw new ExecutionException(new RuntimeException(op.getCancelCause())); } } if (smGetList.size() == 1) return mergedResult; return getSubList(mergedResult, 0, count); }
throw new ExecutionException(new RuntimeException(op.getCancelCause()));
@Override public Map<Integer, CollectionOperationStatus> get(long duration, TimeUnit units) throws InterruptedException, TimeoutException, ExecutionException { if (!latch.await(duration, units)) { for (Operation op : ops) { MemcachedConnection.opTimedOut(op); } throw new CheckedOperationTimeoutException( "Timed out waiting for operation >" + duration + " " + units, ops); } else { // continuous timeout counter will be reset for (Operation op : ops) { MemcachedConnection.opSucceeded(op); } } for (Operation op : ops) { if (op != null && op.hasErrored()) { throw new ExecutionException(op.getException()); } if (op.isCancelled()) { throw new ExecutionException(new RuntimeException(op.getCancelCause())); } } return mergedResult; }
@Override public List<SMGetElement<T>> get(long duration, TimeUnit units) throws InterruptedException, TimeoutException, ExecutionException { if (!blatch.await(duration, units)) { for (Operation op : ops) { MemcachedConnection.opTimedOut(op); } throw new CheckedOperationTimeoutException( "Timed out waiting for operation >" + duration + " " + units, ops); } else { // continuous timeout counter will be reset for (Operation op : ops) { MemcachedConnection.opSucceeded(op); } } for (Operation op : ops) { if (op != null && op.hasErrored()) { throw new ExecutionException(op.getException()); } if (op.isCancelled()) { throw new ExecutionException(new RuntimeException( op.getCancelCause())); } } if (smGetList.size() == 1) return mergedResult; return getSubList(mergedResult, offset, count); }
@Override public Map<Integer, CollectionOperationStatus> get(long duration, TimeUnit units) throws InterruptedException, TimeoutException, ExecutionException { if (!latch.await(duration, units)) { for (Operation op : ops) { MemcachedConnection.opTimedOut(op); } throw new CheckedOperationTimeoutException( "Timed out waiting for operation >" + duration + " " + units, ops); } else { // continuous timeout counter will be reset for (Operation op : ops) { MemcachedConnection.opSucceeded(op); } } for (Operation op : ops) { if (op != null && op.hasErrored()) { throw new ExecutionException(op.getException()); } if (op.isCancelled()) { throw new ExecutionException(new RuntimeException(op.getCancelCause())); } } return mergedResult; }
@Override public Map<String, CollectionOperationStatus> get(long duration, TimeUnit units) throws InterruptedException, TimeoutException, ExecutionException { if (!latch.await(duration, units)) { for (Operation op : ops) { MemcachedConnection.opTimedOut(op); } throw new CheckedOperationTimeoutException( "Timed out waiting for bulk operation >" + duration + " " + units, ops); } else { // continuous timeout counter will be reset for (Operation op : ops) { MemcachedConnection.opSucceeded(op); } } for (Operation op : ops) { if (op != null && op.hasErrored()) { throw new ExecutionException(op.getException()); } if (op.isCancelled()) { throw new ExecutionException(new RuntimeException(op.getCancelCause())); } } return failedResult; }