public void setTimeoutInfinite() { try { if (!isConnected()) { connect(); } socket.setKeepAlive(true); socket.setSoTimeout(0); } catch (SocketException ex) { throw new JedisException(ex); } }
@Override public void connect() { if (!isConnected()) { super.connect(); if (password != null) { auth(password); getStatusCodeReply(); } if (db > 0) { select(Long.valueOf(db).intValue()); getStatusCodeReply(); } } }
protected Connection sendCommand(final Command cmd) { connect(); protocol.sendCommand(outputStream, cmd, new byte[0][]); pipelinedCommands++; return this; }
protected Connection sendCommand(final Command cmd, final byte[]... args) { connect(); protocol.sendCommand(outputStream, cmd, args); pipelinedCommands++; return this; }