Package redis.clients.jedis.exceptions

Examples of redis.clients.jedis.exceptions.JedisConnectionException


    os.writeIntCrLf(arg.length);
    os.write(arg);
    os.writeCrLf();
      }
  } catch (IOException e) {
      throw new JedisConnectionException(e);
  }
    }
View Full Code Here


      } else if (b == DOLLAR_BYTE) {
    return processBulkReply(is);
      } else if (b == PLUS_BYTE) {
    return processStatusCodeReply(is);
      } else {
    throw new JedisConnectionException("Unknown reply: " + (char) b);
      }
  } catch (IOException e) {
      throw new JedisConnectionException(e);
  }
  return null;
    }
View Full Code Here

      }
      // read 2 more bytes for the command delimiter
      is.readByte();
      is.readByte();
  } catch (IOException e) {
      throw new JedisConnectionException(e);
  }

  return read;
    }
View Full Code Here

                } else {
                    sb.append((char) b);
                }
            }
        } catch (IOException e) {
            throw new JedisConnectionException(e);
        }
        String reply = sb.toString();
        if (reply.length() == 0) {
            throw new JedisConnectionException(
                    "It seems like server has closed the connection.");
        }
        return reply;
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public T getResource() {
        try {
            return (T) internalPool.borrowObject();
        } catch (Exception e) {
            throw new JedisConnectionException(
                    "Could not get a resource from the pool", e);
        }
    }
View Full Code Here

    protected void flush() {
        try {
            outputStream.flush();
        } catch (IOException e) {
            throw new JedisConnectionException(e);
        }
    }
View Full Code Here

                socket.connect(new InetSocketAddress(host, port), timeout);
                socket.setSoTimeout(timeout);
                outputStream = new RedisOutputStream(socket.getOutputStream());
                inputStream = new RedisInputStream(socket.getInputStream());
            } catch (IOException ex) {
                throw new JedisConnectionException(ex);
            }
        }
    }
View Full Code Here

                outputStream.close();
                if (!socket.isClosed()) {
                    socket.close();
                }
            } catch (IOException ex) {
                throw new JedisConnectionException(ex);
            }
        }
    }
View Full Code Here

      jedis = (Jedis)goPool.borrowObject();
    } catch (Exception e) {
      if (e instanceof JedisConnectionException) {
        throw (JedisConnectionException)e;
      }
      throw new JedisConnectionException("Connection: ", e);
    }
   
    if (db != 0) {
      jedis.select(db);
    }
View Full Code Here

TOP

Related Classes of redis.clients.jedis.exceptions.JedisConnectionException

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.