Package org.jredis.protocol

Examples of org.jredis.protocol.ValueResponse


    if((hashFieldBytes = getKeyBytes(hashField)) == null)
      throw new IllegalArgumentException ("invalid field => ["+hashField+"]");

    boolean resp = false;
    try {
      ValueResponse response = (ValueResponse) this.serviceRequest(Command.HDEL, hashKeyBytes, hashFieldBytes);
      resp = response.getBooleanValue();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e);
    }
    return resp;
View Full Code Here


    if((hashKeyBytes = getKeyBytes(hashKey)) == null)
      throw new IllegalArgumentException ("invalid key => ["+hashKey+"]");

    long resp = 0;
    try {
      ValueResponse response = (ValueResponse) this.serviceRequest(Command.HLEN, hashKeyBytes);
      resp = response.getLongValue();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e);
    }
    return resp;
View Full Code Here

      throw new IllegalArgumentException ("invalid key => ["+key+"]");

    /* ValueRespose */
    long value = Long.MIN_VALUE;
    try {
      ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.INCR, keybytes);
      value = valResponse.getLongValue();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e);
    }
    return value;
View Full Code Here

      throw new IllegalArgumentException ("invalid key => ["+newkey+"]");

    /* boolean ValueRespose */
    boolean value = false;
    try {
      ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.RENAMENX, oldkeydata, newkeydata);
      value = valResponse.getBooleanValue();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e);
    }
    return value;
View Full Code Here

    if((keybytes = getKeyBytes(key)) == null)
      throw new IllegalArgumentException ("invalid key => ["+key+"]");
    /* boolean ValueRespose */
    boolean res = false;
    try {
      ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.SADD, keybytes, member);
      res = valResponse.getBooleanValue();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e);
    }
    return res;
View Full Code Here

    if((keybytes = getKeyBytes(key)) == null)
      throw new IllegalArgumentException ("invalid key => ["+key+"]");
    /* boolean ValueRespose */
    boolean res = false;
    try {
      ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.ZADD, keybytes, Convert.toBytes(score), member);
      res = valResponse.getBooleanValue();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e);
    }
    return res;
View Full Code Here

    if((keybytes = getKeyBytes(key)) == null)
      throw new IllegalArgumentException ("invalid key => ["+key+"]");

    boolean resvalue = false;
    try {
      ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.SETNX, keybytes, value);
      resvalue = valResponse.getBooleanValue();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e);
    }
    return resvalue;
View Full Code Here

  }

  private boolean msetnx(byte[][] mappings) throws RedisException {
    boolean resvalue = false;
    try {
      ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.MSETNX, mappings);
      resvalue = valResponse.getBooleanValue();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e);
    }
    return resvalue;
View Full Code Here

      throw new IllegalArgumentException ("invalid key => ["+key+"]");

    /* boolean ValueRespose */
    boolean value = false;
    try {
      ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.SISMEMBER, keybytes, member);
      value = valResponse.getBooleanValue();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e);
    }
    return value;
View Full Code Here

      throw new IllegalArgumentException ("invalid key => ["+destKey+"]");

    /* boolean ValueRespose */
    boolean value = false;
    try {
      ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.SMOVE, srcKeyBytes, destKeyBytes, member);
      value = valResponse.getBooleanValue();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e);
    }
    return value;
View Full Code Here

TOP

Related Classes of org.jredis.protocol.ValueResponse

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.