if (sessions == null || sessions.size() == 0) {
throw new MemcachedException(
"The memcached server is not connected,address="
+ 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) {