Package org.jredis

Examples of org.jredis.ProviderException


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


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

    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

    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

    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

    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

    try {
      ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.RANDOMKEY);
      stringValue = valResponse.getStringValue();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e);
    }
    return stringValue;
  }
View Full Code Here

      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);
    }
    return type;
  }
View Full Code Here

    try {
      BulkResponse response = (BulkResponse) this.serviceRequest(Command.INFO);
      bulkData = response.getBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a BulkResponse here => " + e.getLocalizedMessage(), e);
    }

    StringTokenizer tokenizer = new StringTokenizer(new String(bulkData), "\r\n");
    Map<String, String>  infomap = new HashMap<String, String>(12);
    while (tokenizer.hasMoreTokens()){
View Full Code Here

    try {
      MultiBulkResponse MultiBulkResponse = (MultiBulkResponse) this.serviceRequest(Command.MGET, keybytes);
      multiBulkData = MultiBulkResponse.getMultiBulkData();
    }
    catch (ClassCastException e){
      throw new ProviderException("Expecting a MultiBulkResponse here => " + e.getLocalizedMessage(), e);
    }
    return multiBulkData;
  }
View Full Code Here

TOP

Related Classes of org.jredis.ProviderException

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.