public class ConnectionState extends Object
ProtocolVersion
and other options for connection initialization
and connection state restoration. This class is part of the internal API.Constructor and Description |
---|
ConnectionState() |
Modifier and Type | Method and Description |
---|---|
void |
apply(RedisURI redisURI)
Applies settings from
RedisURI . |
Long |
getConnectionId()
Returns the client connection id.
|
RedisCredentialsProvider |
getCredentialsProvider() |
String |
getMode()
Returns the Redis server mode.
|
ProtocolVersion |
getNegotiatedProtocolVersion()
Returns the negotiated
ProtocolVersion . |
String |
getRedisVersion()
Returns the Redis server version.
|
String |
getRole()
Returns the Redis server role.
|
protected void |
setClientName(String clientName) |
protected void |
setCredentialsProvider(RedisCredentialsProvider credentialsProvider) |
protected void |
setDb(int db) |
protected void |
setReadOnly(boolean readOnly) |
protected void |
setUserNamePassword(List<char[]> args)
Sets username/password state based on the argument count from an
AUTH command. |
public void apply(RedisURI redisURI)
RedisURI
.redisURI
- the URI to apply the client name and authentication.public ProtocolVersion getNegotiatedProtocolVersion()
ProtocolVersion
.ProtocolVersion
once the connection is established.public Long getConnectionId()
ProtocolVersion.RESP3
.null
if Redis uses RESP2.public String getRedisVersion()
ProtocolVersion.RESP3
.public String getMode()
ProtocolVersion.RESP3
.public String getRole()
ProtocolVersion.RESP3
.protected void setUserNamePassword(List<char[]> args)
AUTH
command.args
- protected void setCredentialsProvider(RedisCredentialsProvider credentialsProvider)
public RedisCredentialsProvider getCredentialsProvider()
protected void setDb(int db)
protected void setReadOnly(boolean readOnly)
protected void setClientName(String clientName)
Copyright © 2023 lettuce.io. All rights reserved.