Package org.jredis

Examples of org.jredis.RedisException


        // check response status
        //
    ResponseStatus status = Assert.notNull (response.getStatus(), "status from response object", ProviderException.class);
    if(status.isError()) {
      Log.error ("Error response for " + cmd.code + " => " + status.message());
      throw new RedisException(cmd, status.message());
    }
    /* this is handled by the super class */
//    else if(status.code() == ResponseStatus.Code.CIAO) {
//      // normal for quit and shutdown commands.  we disconnect too.
//      disconnect();
View Full Code Here


        throw new ExecutionException ("Bug -- Request processing encountered exceptions but CRE is null", new ProviderException());
      }
    }
    // check for Redis Errors
    if(response.isError())
      throw new ExecutionException("Redis Exception on ["+cmd.name()+"] " + response.getStatus().message(), new RedisException(cmd, response.getStatus().message()));
  }
View Full Code Here

    // 3 - Status
    //
    status = Assert.notNull (response.getStatus(), "status from response object", ProviderException.class);
    if(status.isError()) {
      Log.error ("Error response for " + cmd.code + " => " + status.message());
      throw new RedisException(cmd, status.message());
    }
    else if(status.code() == ResponseStatus.Code.CIAO) {
      // normal for quit and shutdown commands.  we disconnect too.
      disconnect();
    }
View Full Code Here

    // 3 - Status
    //
    status = Assert.notNull (response.getStatus(), "status from response object", ProviderException.class);
    if(status.isError()) {
      Log.error ("Error response for " + cmd.code + " => " + status.message());
      throw new RedisException(cmd, status.message());
    }
    else if(status.code() == ResponseStatus.Code.CIAO) {
      // normal for quit and shutdown commands.  we disconnect too.
      disconnect();
    }
View Full Code Here

        throw new ExecutionException ("Bug -- Request processing encountered exceptions but CRE is null", new ProviderException("unknown cause"));
      }
    }
    // check for Redis Errors
    if(response.isError())
      throw new ExecutionException("Redis Exception on ["+cmd.name()+"] " + response.getStatus().message(), new RedisException(cmd, response.getStatus().message()));
  }
View Full Code Here

        // check response status
        //
    ResponseStatus status = Assert.notNull (response.getStatus(), "status from response object", ProviderException.class);
    if(status.isError()) {
      Log.error ("Error response for " + cmd.code + " => " + status.message());
      throw new RedisException(cmd, status.message());
    }
    /* this is handled by the super class */
//    else if(status.code() == ResponseStatus.Code.CIAO) {
//      // normal for quit and shutdown commands.  we disconnect too.
//      disconnect();
View Full Code Here

  @Override
  public <K extends Object> List<byte[]> smembers(K key) throws RedisException {
    byte[] keydata = null;
    if((keydata = getKeyBytes(key)) == null)
      throw new RedisException (Command.KEYS, "ERR Invalid key.");

    List<byte[]> multiBulkData= null;
    try {
      MultiBulkResponse MultiBulkResponse = (MultiBulkResponse) this.serviceRequest(Command.SMEMBERS, keydata);
      multiBulkData = MultiBulkResponse.getMultiBulkData();
View Full Code Here

  @Override
  public <K extends Object> List<byte[]> keys(K pattern) throws RedisException {
    byte[] keydata = null;
    if((keydata = getKeyBytes(pattern)) == null)
      throw new RedisException (Command.KEYS, "ERR Invalid key.");

    List<byte[]> multiBulkData= null;
    try {
      MultiBulkResponse MultiBulkResponse = (MultiBulkResponse) this.serviceRequest(Command.KEYS, keydata);
      multiBulkData = MultiBulkResponse.getMultiBulkData();
View Full Code Here

//  @Override
  public List<byte[]> smembers(String key) throws RedisException {
    byte[] keydata = null;
    if((keydata = getKeyBytes(key)) == null)
      throw new RedisException (Command.KEYS, "ERR Invalid key.");

    List<byte[]> multiBulkData= null;
    try {
      MultiBulkResponse MultiBulkResponse = (MultiBulkResponse) this.serviceRequest(Command.SMEMBERS, keydata);
      multiBulkData = MultiBulkResponse.getMultiBulkData();
View Full Code Here

//  @Override
  public List<String> keys(String pattern) throws RedisException {
    byte[] keydata = null;
    if((keydata = getKeyBytes(pattern)) == null)
      throw new RedisException (Command.KEYS, "ERR Invalid key.");


    byte[] bulkData= null;
    try {
      BulkResponse response = (BulkResponse) this.serviceRequest(Command.KEYS, keydata);
View Full Code Here

TOP

Related Classes of org.jredis.RedisException

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.