Package net.rubyeye.xmemcached.exception

Examples of net.rubyeye.xmemcached.exception.MemcachedDecodeException


  }

  public final Object decode(CachedData d) {
    byte[] compositeData = d.getData();
    if (compositeData.length <= 4)
      throw new MemcachedDecodeException(
          "There are no four bytes before value for TokyoTyrantTranscoder");
    byte[] flagBytes = new byte[4];
    byte[] realData = new byte[compositeData.length - 4];
    System.arraycopy(compositeData, 0, flagBytes, 0, 4);
    System.arraycopy(compositeData, 4, realData, 0,
View Full Code Here


  }

  public final Object decode(CachedData d) {
    byte[] compositeData = d.getData();
    if (compositeData.length <= 4)
      throw new MemcachedDecodeException(
          "There are no four bytes before value for TokyoTyrantTranscoder");
    byte[] flagBytes = new byte[4];
    byte[] realData = new byte[compositeData.length - 4];
    System.arraycopy(compositeData, 0, flagBytes, 0, 4);
    System.arraycopy(compositeData, 4, realData, 0,
View Full Code Here

  public abstract boolean decode(MemcachedTCPSession session,
      ByteBuffer buffer);

  protected final void decodeError(String msg, Throwable e) {
    throw new MemcachedDecodeException(
        msg == null ? "decode error,session will be closed" : msg, e);
  }
View Full Code Here

    throw new MemcachedDecodeException(
        msg == null ? "decode error,session will be closed" : msg, e);
  }

  protected final void decodeError() {
    throw new MemcachedDecodeException(
        "decode error,session will be closed");
  }
View Full Code Here

      setException(new MemcachedServerException(getErrorMsg(line,
          "Unknown Server Error")));
      this.countDownLatch();
      return true;
    } else {
      throw new MemcachedDecodeException(
          "Decode error,session will be closed,line=" + line);
    }

  }
View Full Code Here

    byte op = buffer.get();
    if (op != this.opCode.fieldValue()) {
      if (this.noreply) {
        return false;
      } else {
        throw new MemcachedDecodeException("Not a proper "
            + this.opCode.name() + " response");
      }
    }
    return true;
  }
View Full Code Here

  private void readMagicNumber(ByteBuffer buffer) {
    byte magic = buffer.get();

    if (magic != RESPONSE_MAGIC_NUMBER) {
      throw new MemcachedDecodeException("Not a proper response");
    }
  }
View Full Code Here

    byte op = buffer.get();
    if (op != this.opCode.fieldValue()) {
      if (this.noreply) {
        return false;
      } else {
        throw new MemcachedDecodeException("Not a proper "
            + this.opCode.name() + " response");
      }
    }
    return true;
  }
View Full Code Here

  private void readMagicNumber(ByteBuffer buffer) {
    byte magic = buffer.get();

    if (magic != RESPONSE_MAGIC_NUMBER) {
      throw new MemcachedDecodeException("Not a proper response");
    }
  }
View Full Code Here

  public abstract boolean decode(MemcachedTCPSession session,
      ByteBuffer buffer);

  protected final void decodeError(String msg, Throwable e) {
    throw new MemcachedDecodeException(
        msg == null ? "decode error,session will be closed,key="
            + this.key : msg, e);
  }
View Full Code Here

TOP

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

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.