Package org.jredis.protocol

Examples of org.jredis.protocol.ValueResponse


      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

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

    long resvalue = -1;
    try {
      ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.APPEND, keybytes, value);
      resvalue = valResponse.getLongValue();
    }
    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

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

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

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

    boolean resp = false;
    try {
      ValueResponse response = (ValueResponse) this.serviceRequest(Command.HEXISTS, hashKeyBytes, hashFieldBytes);
      resp = response.getBooleanValue();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e);
    }
    return resp;
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.