Package org.jredis.protocol

Examples of org.jredis.protocol.ValueResponse


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

    RedisType  type = null;
    /* ValueRespose */
    try {
      ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.TYPE, keybytes);
      String stringValue = valResponse.getStringValue();
      type = RedisType.valueOf(stringValue);
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e);
    }
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.DEL, keybytes);
      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+"]");

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

    byte[] countBytes = Convert.toBytes(count);

    long remcnt = 0;
    try {
      ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.LREM, keybytes, value, countBytes);
      remcnt = valResponse.getLongValue();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e);
    }
    return remcnt;
View Full Code Here

   
    byte[] toBytes = Convert.toBytes(dbIndex);

    boolean resvalue = false;
    try {
      ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.MOVE, keybytes, toBytes);
      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+"]");

    boolean resvalue = false;
    try {
      ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.SREM, keybytes, member);
      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+"]");

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

    byte[] ttlbytes = Convert.toBytes(ttlseconds);
   
    boolean resvalue = false;
    try {
      ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.EXPIRE, keybytes, ttlbytes);
      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+"]");

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