Package net.rubyeye.xmemcached.exception

Examples of net.rubyeye.xmemcached.exception.MemcachedException


    byte[] keyBytes = this.checkStoreArguments(key, 0, value);
    try {
      this.sendStoreCommand(this.commandFactory.createAppendCommand(key,
          keyBytes, value, true, this.transcoder), this.opTimeout);
    } catch (TimeoutException e) {
      throw new MemcachedException(e);
    }

  }
View Full Code Here


    byte[] keyBytes = this.checkStoreArguments(key, 0, value);
    try {
      this.sendStoreCommand(this.commandFactory.createPrependCommand(key,
          keyBytes, value, true, this.transcoder), this.opTimeout);
    } catch (TimeoutException e) {
      throw new MemcachedException(e);
    }
  }
View Full Code Here

          "max tries must be greater than 0");
    }
    int tryCount = 0;
    GetsResponse<T> result = getsResponse;
    if (result == null) {
      throw new MemcachedException("Null GetsResponse");
    }
    while (tryCount <= operation.getMaxTries()
        && result != null
        && !this.sendStoreCommand(this.commandFactory.createCASCommand(
            key, keyBytes, exp, operation.getNewValue(result
                .getCas(), result.getValue()), result.getCas(),
            noreply, transcoder), this.opTimeout) && !noreply) {
      tryCount++;
      result = this.gets0(key, keyBytes, transcoder);
      if (result == null) {
        throw new MemcachedException(
            "could not gets the value for Key=" + key + " for cas");
      }
      if (tryCount > operation.getMaxTries()) {
        throw new TimeoutException("CAS try times is greater than max");
      }
View Full Code Here

  public final void deleteWithNoReply(final String key, final int time)
      throws InterruptedException, MemcachedException {
    try {
      this.delete0(key, time, true, this.opTimeout);
    } catch (TimeoutException e) {
      throw new MemcachedException(e);
    }
  }
View Full Code Here

    if (!command.isNoreply()) {
      this.latchWait(command, opTimeout);
      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

  void checkException(final Command command) throws MemcachedException {
    if (command.getException() != null) {
      if (command.getException() instanceof MemcachedException)
        throw (MemcachedException) command.getException();
      else
        throw new MemcachedException(command.getException());
    }
  }
View Full Code Here

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

    key = this.sanitizeKey(key);
    try {
      this.sendIncrOrDecrCommand(key, delta, 0, CommandType.INCR, true,
          this.opTimeout, 0);
    } catch (TimeoutException e) {
      throw new MemcachedException(e);
    }
  }
View Full Code Here

    key = this.sanitizeKey(key);
    try {
      this.sendIncrOrDecrCommand(key, delta, 0, CommandType.DECR, true,
          this.opTimeout, 0);
    } catch (TimeoutException e) {
      throw new MemcachedException(e);
    }
  }
View Full Code Here

  public void flushAllWithNoReply() throws InterruptedException,
      MemcachedException {
    try {
      this.flushAllMemcachedServers(this.opTimeout, true, 0);
    } catch (TimeoutException e) {
      throw new MemcachedException(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.