Package org.jredis

Examples of org.jredis.ClientRuntimeException


    try {
      socketAddress = new InetSocketAddress(address, port);
      connect ();
    }
    catch (IOException e) {
      throw new ClientRuntimeException
      ("Failed to open connection due to io error => " + e.getLocalizedMessage(), e);
    }
  }
View Full Code Here


        // on connection reset
        throw new ConnectionResetException("SocketException in readLine.  Command: " + cmd.code, e);
      }
      catch (IOException e) {
        e.printStackTrace();
        throw new ClientRuntimeException ("IOException in readLine.  Command: " + cmd.code, e);
      }
    }
View Full Code Here

        // on connection reset
        throw new ConnectionResetException("SocketException in readLine.  Command: " + cmd.code, e);
      }
      catch (IOException e) {
        e.printStackTrace();
        throw new ClientRuntimeException ("IOException in readLine.  Command: " + cmd.code, e);
      }
        }
View Full Code Here

          }
        }
      }
      catch (IOException e) {
        e.printStackTrace();
        throw new ClientRuntimeException ("IOEx while reading line for command " + cmd.code, e);
      }
     
      if(c==-1) throw new ClientRuntimeException ("in.read returned -1");
    }
View Full Code Here

     
      int readcnt = -1;
      int offset = 0;

      while(offset < length){
        if((readcnt = in.read (data, offset, length-offset)) ==-1 ) throw new ClientRuntimeException("IO - read returned -1 -- problem");
        offset += readcnt;
      }
      // FIX: http://github.com/alphazero/jredis/issues#issue/5 -- BEGIN
      for(int i=0; i<CRLF_LEN; i++){
        if (in.read() == -1){
View Full Code Here

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

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

      InetAddress address;
        try {
          address = InetAddress.getByName(host);
        }
        catch (UnknownHostException e) {
          throw new ClientRuntimeException("unknown host: " + host, e);
        }
   
    return newSpec(address, port, database, credentials);
  }
View Full Code Here

      this.spec = notNull(spec, "ConnectionSpec init parameter", ClientRuntimeException.class);
      socketAddress = new InetSocketAddress(spec.getAddress(), spec.getPort());
      initializeComponents();
    }
    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);
    }
View Full Code Here

    notifyFaulted(fault);
    Log.problem("Shutting down due to connection FAULT: %s - %s", fault, this);
//    notifyShuttingDown();
    shutdown(); // REVU: best to add a pending shutdown flag ..
     if(raiseEx)
       throw new ClientRuntimeException(fault);
  }
View Full Code Here

TOP

Related Classes of org.jredis.ClientRuntimeException

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.