Package org.jredis

Examples of org.jredis.ProviderException


      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

    } catch (IOException e) {
      Log.error("IOException cmd:%s isConnected:%b", cmd.code, isConnected());
      this.onConnectionFault(String.format("IOFault (cmd: %s)", cmd.code), true);
    } catch (ArrayIndexOutOfBoundsException e){
      Log.error("on %s", cmd.code);
      throw new ProviderException("BUG - recheck assumptions ..", e);
    } finally {
      requestlock.unlock();
    }
   
    return queuedRequest;
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(connectImmediately) { connect (); }
  }
View Full Code Here

        break;
      case Synchronous:
        initializeSynchConnection();
        break;
      default:
        throw new ProviderException("Modality " + 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

        break;
     
      }
    }
    catch (IOException e) {
      throw new ProviderException("Problem writing to the buffer" + e.getLocalizedMessage(), e);
    }
    return createRequest(buffer);
  }
View Full Code Here

    int available = buffer.length - offset;
    if(len > available) {
      int c = getMoreBytes (len)// this is a potentially blocking call
      if(c==-1) return -1;
      else if(c < len - available)
        throw new ProviderException ("Bug: getMoreBytes() returned less bytes than requested.  c="+c+" len=" + len + "available=" + available);
    }

    if(len == 1){
      b[off] = buffer[offset];
    }
View Full Code Here

    /* (non-Javadoc)
     * @see com.alphazero.jredis.connector.Message#read(java.io.InputStream)
     */
    @Override
    public void read(InputStream in) throws ClientRuntimeException, ProviderException {
      throw new ProviderException("Request.read is not supported by this class! [Apr 2, 2009]");
    }
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

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.