public class Connection
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
protected RedisProtocol |
protocol |
protected java.lang.String |
server |
protected java.lang.String |
version |
| Constructor and Description |
|---|
Connection() |
Connection(HostAndPort hostAndPort) |
Connection(HostAndPort hostAndPort,
JedisClientConfig clientConfig) |
Connection(JedisSocketFactory socketFactory) |
Connection(JedisSocketFactory socketFactory,
JedisClientConfig clientConfig) |
Connection(java.lang.String host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
connect() |
void |
disconnect()
Close the socket and disconnect the server.
|
protected byte[] |
encodeToBytes(char[] chars) |
java.lang.Object |
executeCommand(CommandArguments args) |
<T> T |
executeCommand(CommandObject<T> commandObject) |
java.lang.Object |
executeCommand(ProtocolCommand cmd) |
protected void |
flush() |
byte[] |
getBinaryBulkReply() |
java.util.List<byte[]> |
getBinaryMultiBulkReply() |
java.lang.String |
getBulkReply() |
java.util.List<java.lang.Long> |
getIntegerMultiBulkReply() |
java.lang.Long |
getIntegerReply() |
java.util.List<java.lang.Object> |
getMany(int count) |
java.util.List<java.lang.String> |
getMultiBulkReply() |
java.util.List<java.lang.Object> |
getObjectMultiBulkReply() |
java.lang.Object |
getOne() |
RedisProtocol |
getRedisProtocol() |
int |
getSoTimeout() |
java.lang.String |
getStatusCodeReply() |
java.lang.Object |
getUnflushedObject() |
java.util.List<java.lang.Object> |
getUnflushedObjectMultiBulkReply()
Deprecated.
Use
getUnflushedObject(). |
protected java.util.Map<java.lang.String,java.lang.Object> |
hello(byte[]... args) |
protected void |
initializeFromClientConfig(JedisClientConfig config) |
boolean |
isBroken() |
boolean |
isConnected() |
boolean |
ping() |
protected java.lang.Object |
protocolRead(RedisInputStream is) |
protected void |
protocolReadPushes(RedisInputStream is) |
protected java.lang.Object |
readProtocolWithCheckingBroken() |
protected void |
readPushesWithCheckingBroken() |
void |
rollbackTimeout() |
java.lang.String |
select(int index) |
void |
sendCommand(CommandArguments args) |
void |
sendCommand(ProtocolCommand cmd) |
void |
sendCommand(ProtocolCommand cmd,
byte[]... args) |
void |
sendCommand(ProtocolCommand cmd,
Rawable keyword) |
void |
sendCommand(ProtocolCommand cmd,
java.lang.String... args) |
void |
setBroken() |
void |
setHandlingPool(ConnectionPool pool) |
void |
setSoTimeout(int soTimeout) |
void |
setTimeoutInfinite() |
java.lang.String |
toIdentityString() |
java.lang.String |
toString() |
protected RedisProtocol protocol
protected java.lang.String server
protected java.lang.String version
public Connection()
public Connection(java.lang.String host,
int port)
public Connection(HostAndPort hostAndPort)
public Connection(HostAndPort hostAndPort, JedisClientConfig clientConfig)
public Connection(JedisSocketFactory socketFactory)
public Connection(JedisSocketFactory socketFactory, JedisClientConfig clientConfig)
public java.lang.String toString()
toString in class java.lang.Object@Experimental public java.lang.String toIdentityString()
public final RedisProtocol getRedisProtocol()
public final void setHandlingPool(ConnectionPool pool)
public int getSoTimeout()
public void setSoTimeout(int soTimeout)
public void setTimeoutInfinite()
public void rollbackTimeout()
public java.lang.Object executeCommand(ProtocolCommand cmd)
public java.lang.Object executeCommand(CommandArguments args)
public <T> T executeCommand(CommandObject<T> commandObject)
public void sendCommand(ProtocolCommand cmd)
public void sendCommand(ProtocolCommand cmd, Rawable keyword)
public void sendCommand(ProtocolCommand cmd, java.lang.String... args)
public void sendCommand(ProtocolCommand cmd, byte[]... args)
public void sendCommand(CommandArguments args)
public void connect()
throws JedisConnectionException
JedisConnectionExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic void disconnect()
public boolean isConnected()
public boolean isBroken()
public void setBroken()
public java.lang.String getStatusCodeReply()
public java.lang.String getBulkReply()
public byte[] getBinaryBulkReply()
public java.lang.Long getIntegerReply()
public java.util.List<java.lang.String> getMultiBulkReply()
public java.util.List<byte[]> getBinaryMultiBulkReply()
@Deprecated public java.util.List<java.lang.Object> getUnflushedObjectMultiBulkReply()
getUnflushedObject().public java.lang.Object getUnflushedObject()
public java.util.List<java.lang.Object> getObjectMultiBulkReply()
public java.util.List<java.lang.Long> getIntegerMultiBulkReply()
public java.lang.Object getOne()
protected void flush()
@Experimental protected java.lang.Object protocolRead(RedisInputStream is)
@Experimental protected void protocolReadPushes(RedisInputStream is)
protected java.lang.Object readProtocolWithCheckingBroken()
protected void readPushesWithCheckingBroken()
public java.util.List<java.lang.Object> getMany(int count)
protected void initializeFromClientConfig(JedisClientConfig config)
protected java.util.Map<java.lang.String,java.lang.Object> hello(byte[]... args)
protected byte[] encodeToBytes(char[] chars)
public java.lang.String select(int index)
public boolean ping()
Copyright © 2024. All rights reserved.