+ this.inetSocketAddress);
}
Session session = sessions.peek();
CountDownLatch latch = new CountDownLatch(1);
if (this.memcachedClient.getProtocol() == Protocol.Text) {
TextCacheDumpCommand textCacheDumpCommand = new TextCacheDumpCommand(
latch, itemNumber);
session.write(textCacheDumpCommand);
if (!latch.await(this.opTimeout, TimeUnit.MILLISECONDS)) {
throw new TimeoutException("stats cachedump timeout");
}
if (textCacheDumpCommand.getException() != null) {
if (textCacheDumpCommand.getException() instanceof MemcachedException) {
throw (MemcachedException) textCacheDumpCommand
.getException();
} else {
throw new MemcachedServerException(textCacheDumpCommand
.getException());
}
}
this.currentKeyList = (LinkedList<String>) textCacheDumpCommand
.getResult();
} else {
throw new MemcachedException(
this.memcachedClient.getProtocol().name()
+ " protocol doesn't support iterating all keys in memcached");