Examples of MemcachedException


Examples of net.rubyeye.xmemcached.exception.MemcachedException

  }

  private final Session sendCommand(final Command cmd)
      throws MemcachedException {
    if (this.shutdown) {
      throw new MemcachedException("Xmemcached is stopped");
    }
    return this.connector.send(cmd);
  }
View Full Code Here

Examples of net.rubyeye.xmemcached.exception.MemcachedException

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

Examples of net.rubyeye.xmemcached.exception.MemcachedException

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

  }
View Full Code Here

Examples of net.rubyeye.xmemcached.exception.MemcachedException

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

  }
View Full Code Here

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

Examples of net.rubyeye.xmemcached.exception.MemcachedException

    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

Examples of net.rubyeye.xmemcached.exception.MemcachedException

          "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

Examples of net.rubyeye.xmemcached.exception.MemcachedException

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

Examples of net.rubyeye.xmemcached.exception.MemcachedException

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

Examples of net.rubyeye.xmemcached.exception.MemcachedException

  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
TOP
Copyright © 2018 www.massapi.com. 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.