public class Connection extends Object implements Closeable
Constructor and Description |
---|
Connection() |
Connection(String host) |
Connection(String host,
int port) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
connect() |
void |
disconnect() |
protected void |
flush() |
List<Object> |
getAll() |
List<Object> |
getAll(int except) |
byte[] |
getBinaryBulkReply() |
List<byte[]> |
getBinaryMultiBulkReply() |
String |
getBulkReply() |
String |
getHost() |
List<Long> |
getIntegerMultiBulkReply() |
Long |
getIntegerReply() |
List<String> |
getMultiBulkReply() |
List<Object> |
getObjectMultiBulkReply() |
Object |
getOne() |
int |
getPort() |
List<Object> |
getRawObjectMultiBulkReply() |
Socket |
getSocket() |
protected String |
getStatusCodeReply() |
int |
getTimeout() |
boolean |
isConnected() |
void |
resetPipelinedCount() |
void |
rollbackTimeout() |
protected Connection |
sendCommand(Protocol.Command cmd) |
protected Connection |
sendCommand(Protocol.Command cmd,
byte[]... args) |
protected Connection |
sendCommand(Protocol.Command cmd,
String... args) |
void |
setHost(String host) |
void |
setPort(int port) |
void |
setTimeout(int timeout) |
void |
setTimeoutInfinite() |
public Connection(String host)
public Connection(String host, int port)
public Connection()
public Socket getSocket()
public int getTimeout()
public void setTimeout(int timeout)
public void setTimeoutInfinite()
public void rollbackTimeout()
protected void flush()
protected Connection sendCommand(Protocol.Command cmd, String... args)
protected Connection sendCommand(Protocol.Command cmd, byte[]... args)
protected Connection sendCommand(Protocol.Command cmd)
public String getHost()
public void setHost(String host)
public int getPort()
public void setPort(int port)
public void connect()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void disconnect()
public boolean isConnected()
protected String getStatusCodeReply()
public String getBulkReply()
public byte[] getBinaryBulkReply()
public Long getIntegerReply()
public List<byte[]> getBinaryMultiBulkReply()
public void resetPipelinedCount()
public Object getOne()
Copyright © 2014. All rights reserved.