Package org.jredis

Examples of org.jredis.ProviderException


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


  // ------------------------------------------------------------------------

  public void onEvent(Connection.Event event) {
    Connection conn = event.getSource();
    if(!connections.containsKey(conn)){
      throw new ProviderException("ClusterConnection receiving events for unrelated connection!");
    }
   
    // TODO: deal with it!
    Connection.Event.Type type = event.getType();
    switch (type) {
    case DISCONNECTED:
      break;
    case CONNECTED:
      break;
    case FAULTED:
      break;
    }
    throw new ProviderException("[BUG] lazy programmer -- TODOs here!");
  }
View Full Code Here

  /**
     * @param nodeSpec
     * @return
     */
    protected Connection createAsynchConnection (ClusterNodeSpec nodeSpec) {
      throw new ProviderException("Not implemented in the abstract base!");
    }
View Full Code Here

  /**
     * @param nodeSpec
     * @return
     */
    protected Connection createSynchConnection (ClusterNodeSpec nodeSpec) {
      throw new ProviderException("Not implemented in the abstract base!");
    }
View Full Code Here

  /* (non-Javadoc) @see org.jredis.ri.cluster.connection.ClusterConnectionBase#initializeComponents() */
  @Override
  protected void initializeComponents () {
    // TODO Auto-generated method stub
    throw new ProviderException("[LAZY] implement me!");
  }
View Full Code Here

            pending.setCRE(cre);
          }
          catch (RuntimeException e){
            Log.error ("Unexpected (and not handled) RuntimeException: " + e.getLocalizedMessage());
            e.printStackTrace();
            pending.setCRE(new ProviderException("Unexpected runtime exception in response handler"));
            pending.setResponse(null);
            break;
          }
         
          // redis (1.00) simply shutsdown connection even if pending responses
View Full Code Here

          if(e.getCause() instanceof RedisException) {
            throw (RedisException) e.getCause();
          }
          else {
            e.printStackTrace();
            throw new ProviderException("on pendingResponse.get()", e);
          }
        }
     
        // check response status
        //
View Full Code Here

    /** called by child classes to indicate if & when their read operation has completed */
    protected final boolean didRead (boolean value) { return didRead = value;}
   
    /** a bit aggressive but to force out the little bugs .. */
    protected final void assertResponseRead () {
      if(!didRead) throw new ProviderException ("Response has not been read yet! -- whose bad?");
    }
View Full Code Here

          throw new ExecutionException ("Provider Exception", cre);
        else if( cre instanceof ClientRuntimeException)
          throw new ExecutionException ("Client Runtime Exception", cre);
      }
      else {
        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

        status = new ResponseStatus(ResponseStatus.Code.ERROR, new String(buffer, 1, offset-3));
        didRead = true// we're done - error's are only one line
        return -2;
      }
      if(buffer[0] != ctlByte) {
        throw new ProviderException ("Bug?  Expecting status code for size/count");
      }
      status = ResponseStatus.STATUS_OK;
      return Convert.toInt (buffer, 1, offset-3);
    }
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.