Package net.rubyeye.xmemcached.command.text

Examples of net.rubyeye.xmemcached.command.text.TextCacheDumpCommand


              + 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");
View Full Code Here


              + 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");
View Full Code Here

TOP

Related Classes of net.rubyeye.xmemcached.command.text.TextCacheDumpCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.