Package net.rubyeye.xmemcached.exception

Examples of net.rubyeye.xmemcached.exception.MemcachedException


  public void flushAllWithNoReply(int exptime) throws InterruptedException,
      MemcachedException {
    try {
      this.flushAllMemcachedServers(this.opTimeout, true, exptime);
    } catch (TimeoutException e) {
      throw new MemcachedException(e);
    }
  }
View Full Code Here


  public void flushAllWithNoReply(InetSocketAddress address)
      throws MemcachedException, InterruptedException {
    try {
      this.flushSpecialMemcachedServer(address, this.opTimeout, true, 0);
    } catch (TimeoutException e) {
      throw new MemcachedException(e);
    }
  }
View Full Code Here

      throws MemcachedException, InterruptedException {
    try {
      this.flushSpecialMemcachedServer(address, this.opTimeout, true,
          exptime);
    } catch (TimeoutException e) {
      throw new MemcachedException(e);
    }
  }
View Full Code Here

    CountDownLatch latch = new CountDownLatch(1);

    Queue<Session> sessionQueue = this.connector
        .getSessionByAddress(address);
    if (sessionQueue == null || sessionQueue.peek() == null) {
      throw new MemcachedException("could not find session for "
          + SystemUtils.getRawAddress(address) + ":"
          + address.getPort() + ",maybe it have not been connected");
    }

    Command command = this.commandFactory.createVerbosityCommand(latch,
View Full Code Here

  public void setLoggingLevelVerbosityWithNoReply(InetSocketAddress address,
      int level) throws InterruptedException, MemcachedException {
    try {
      this.setMemcachedLoggingLevel(address, level, true);
    } catch (TimeoutException e) {
      throw new MemcachedException(e);
    }

  }
View Full Code Here

    CountDownLatch latch = new CountDownLatch(1);

    Queue<Session> sessionQueue = this.connector
        .getSessionByAddress(address);
    if (sessionQueue == null || sessionQueue.peek() == null) {
      throw new MemcachedException("could not find session for "
          + SystemUtils.getRawAddress(address) + ":"
          + address.getPort() + ",maybe it have not been connected");
    }
    Command command = this.commandFactory.createFlushAllCommand(latch,
        exptime, noreply);
View Full Code Here

    CountDownLatch latch = new CountDownLatch(1);

    Queue<Session> sessionQueue = this.connector
        .getSessionByAddress(address);
    if (sessionQueue == null || sessionQueue.peek() == null) {
      throw new MemcachedException("could not find session for "
          + SystemUtils.getRawAddress(address) + ":"
          + address.getPort() + ",maybe it have not been connected");
    }
    Command command = this.commandFactory.createStatsCommand(address,
        latch, null);
View Full Code Here

    if (!command.isNoreply()) {
      this.latchWait(command, operationTimeout);
      command.getIoBuffer().free();
      this.checkException(command);
      if (command.getResult() == null) {
        throw new MemcachedException(
            "Operation fail,may be caused by networking or timeout");
      }
      final Object result = command.getResult();
      if (result instanceof String) {
        if (((String) result).equals("NOT_FOUND")) {
          if (this.add(key, exp, String.valueOf(initValue),
              this.opTimeout)) {
            return initValue;
          } else {
            return this.sendIncrOrDecrCommand(key, delta,
                initValue, cmdType, noreply, operationTimeout,
                exp);
          }
        } else {
          throw new MemcachedException(
              "Unknown result type for incr/decr:"
                  + result.getClass() + ",result=" + result);
        }
      } else {
        return (Long) command.getResult();
View Full Code Here

    if (!command.isNoreply()) {
      this.latchWait(command, timeout);
      command.getIoBuffer().free();
      this.checkException(command);
      if (command.getResult() == null) {
        throw new MemcachedException(
            "Operation fail,may be caused by networking or timeout");
      }
    } else {
      return false;
    }
View Full Code Here

  private String decodeKey(String key) throws MemcachedException {
    try {
      return this.sanitizeKeys ? URLDecoder.decode(key, "UTF-8") : key;
    } catch (UnsupportedEncodingException e) {
      throw new MemcachedException(
          "Unsupport encoding utf-8 when decodeKey", e);
    }
  }
View Full Code Here

TOP

Related Classes of net.rubyeye.xmemcached.exception.MemcachedException

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.