Future<Object> future; try { future = clientHolder.get().asyncGet(computeKeyHash(memcachedPrefix, key));
long start = System.currentTimeMillis(); try { future = client.asyncGet(hashedKey); } catch (IllegalStateException e) {
long start = System.currentTimeMillis(); try { future = client.asyncGet(hashedKey); } catch (IllegalStateException e) {
@Override public <T> T get(final String key, final CacheTranscoder transcoder, final long timeout) throws TimeoutException, CacheException { Future<T> f = null; try { f = memcachedClient.asyncGet(key, this.<T> getTranscoder(transcoder)); return f.get(timeout, TimeUnit.MILLISECONDS); } catch (InterruptedException | ExecutionException e) { cancel(f); throw new CacheException(e); } }
@Override public <T> T get(final String key, final CacheTranscoder transcoder, final long timeout) throws TimeoutException, CacheException { Future<T> f = null; try { f = memcachedClient.asyncGet(key, this.<T> getTranscoder(transcoder)); return f.get(timeout, TimeUnit.MILLISECONDS); } catch (InterruptedException | ExecutionException e) { cancel(f); throw new CacheException(e); } }
future = client.asyncGet(computeKeyHash(memcachedPrefix, key)); } catch(IllegalStateException e) {
Future<Object> future; try { future = clientHolder.get().asyncGet(computeKeyHash(memcachedPrefix, key));
Future<Object> future; try { future = clientHolder.get().asyncGet(computeKeyHash(memcachedPrefix, key));
@Override public ComposableFuture<V> getAsync(final K key) { return SpyFutureHelper.fromGet(() -> { @SuppressWarnings("unchecked") final Transcoder<V> transcoder = (Transcoder<V>) spyClient.getTranscoder(); return spyClient.asyncGet(keyTranslator.translateKey(key), transcoder); }); }