Package org.jredis.protocol

Examples of org.jredis.protocol.BulkResponse


    if((keybytes = getKeyBytes(key)) == null)
      throw new IllegalArgumentException ("invalid key => ["+key+"]");
    /* Double BulkResponse */
    Double resvalue = null;
    try {
      BulkResponse bulkResponse = (BulkResponse) this.serviceRequest(Command.ZINCRBY, keybytes, Convert.toBytes(score), member);
      if (bulkResponse.getBulkData() != null)
        resvalue = Convert.toDouble(bulkResponse.getBulkData());
    }
    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+"]");

    byte[] bulkData= null;
    try {
      BulkResponse response = (BulkResponse) this.serviceRequest(Command.GETSET, keybytes, value);
      bulkData = response.getBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a BulkResponse here => " + e.getLocalizedMessage(), e);
    }
    return bulkData;
View Full Code Here

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

    byte[] bulkData= null;
    try {
      BulkResponse response = (BulkResponse) this.serviceRequest(Command.SRANDMEMBER, keybytes);
      bulkData = response.getBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a BulkResponse here => " + e.getLocalizedMessage(), e);
    }
    return bulkData;
View Full Code Here

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

    byte[] bulkData= null;
    try {
      BulkResponse response = (BulkResponse) this.serviceRequest(Command.GET, keybytes);
      bulkData = response.getBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a BulkResponse here => " + e.getLocalizedMessage(), e);
    }
    return bulkData;
View Full Code Here

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

    byte[] bulkData= null;
    try {
      BulkResponse response = (BulkResponse) this.serviceRequest(Command.LINDEX, keybytes, Convert.toBytes(index));
      bulkData = response.getBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a BulkResponse here => " + e.getLocalizedMessage(), e);
    }
    return bulkData;
View Full Code Here

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

    byte[] bulkData= null;
    try {
      BulkResponse response = (BulkResponse) this.serviceRequest(Command.LPOP, keybytes);
      bulkData = response.getBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a BulkResponse here => " + e.getLocalizedMessage(), e);
    }
    return bulkData;
View Full Code Here

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

    byte[] bulkData= null;
    try {
      BulkResponse response = (BulkResponse) this.serviceRequest(Command.RPOP, keybytes);
      bulkData = response.getBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a BulkResponse here => " + e.getLocalizedMessage(), e);
    }
    return bulkData;
View Full Code Here

//  @Override
  public Map<String, String> info() throws RedisException {

    byte[] bulkData= null;
    try {
      BulkResponse response = (BulkResponse) this.serviceRequest(Command.INFO);
      bulkData = response.getBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a BulkResponse here => " + e.getLocalizedMessage(), e);
    }
View Full Code Here

      throw new RedisException (Command.KEYS, "ERR Invalid key.");


    byte[] bulkData= null;
    try {
      BulkResponse response = (BulkResponse) this.serviceRequest(Command.KEYS, keydata);
      bulkData = response.getBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a BulkResponse here => " + e.getLocalizedMessage(), e);
    }
View Full Code Here

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

    Double resvalue = null;
    try {
      BulkResponse bulkResponse = (BulkResponse) this.serviceRequest(Command.ZSCORE, keybytes, member);
      if (bulkResponse.getBulkData() != null)
        resvalue = Convert.toDouble(bulkResponse.getBulkData());
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a BulkResponse here => " + e.getLocalizedMessage(), e);
    }
    return resvalue;
View Full Code Here

TOP

Related Classes of org.jredis.protocol.BulkResponse

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.