Package org.jredis

Examples of org.jredis.ProviderException


    @Override
    public void onEvent (Event event) {
      if(event.getSource() != ChunkedPipelineConnection.this) {
        String msg = String.format("event source [%s] is not this pipeline [%s]", event.getSource(), ChunkedPipelineConnection.this);
        Log.bug(msg);
        throw new ProviderException(msg);
      }
      //          (new Exception()).printStackTrace();
      Log.log("Pipeline.ResponseHandler: onEvent %s source: %s", event.getType().name(), event.getSource());
      switch (event.getType()){
      case CONNECTED:
View Full Code Here


         * @param valueType
         */
        protected ResponseImpl (Command cmd, Type type, ValueType valueType) {
          super(cmd, type);
          if(type != Type.Bulk && type != Type.MultiBulk && valueType == null)
            throw new ProviderException("have null valueType for Response.Type " + type.name());
         
          this.valueType = valueType;
        }
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

      if(!status.isError() && size >= 0){
        try {
          data = super.readBulkData(in, size);
        }
        catch (IllegalArgumentException bug){
          throw new ProviderException ("Bug: in converting the bulk data length bytes", bug);
        }
        catch (IOException problem) {
          throw new ClientRuntimeException ("Problem: reading the bulk data bytes", problem);
        }
        catch (RuntimeException bug) {
          throw new ProviderException ("Bug: reading the bulk data bytes.  expecting " + size + " bytes.", bug);
        }
      }
      didRead = true;
      return;
    }
View Full Code Here

            else
              datalist.add(null);
          }
        }
        catch (IllegalArgumentException bug){
          throw new ProviderException ("Bug: in converting the bulk data length bytes", bug);
        }
        catch (IOException problem) {
          throw new ClientRuntimeException ("Problem: reading the bulk data bytes", problem);
        }
        catch (RuntimeException bug) {
          throw new ProviderException ("Bug: reading the multibulk data bytes.", bug);
        }
      }
      didRead = true;
      return;
    }
View Full Code Here

            pending.setCRE(cre);
          }
          catch (RuntimeException e){
            Log.error("Unexpected RuntimeException ", e);
            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

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

    catch (IllegalArgumentException e) {
      throw new ClientRuntimeException
        ("invalid connection spec parameters: " + e.getLocalizedMessage(), e);
    }
    catch (Exception e) {
      throw new ProviderException("Unexpected error on initialize -- BUG", e);
    }

    if (spec.getConnectionFlag(Flag.CONNECT_IMMEDIATELY)) {
      connect ();
    }
View Full Code Here

        break;
      case Synchronous:
        initializeSyncConnection();
        break;
      default:
        throw new ProviderException("Modality " + spec.getModality().name() + " is not supported.");
      }
    }
View Full Code Here

            else if(e.getCause() instanceof ProviderException)
              throw (ProviderException) e.getCause();
            else if(e.getCause() instanceof ClientRuntimeException)
              throw (ClientRuntimeException) e.getCause();
          }
          throw new ProviderException("Exception while initializing asynchronous connection", e);
        }
    }
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.