public final class JedisConnectionOperations extends AbstractConnectionOperations<JedisStandaloneClient>
JedisRedisOperations.AbstractJedisCommand<CLIENT extends JedisRedisClient,CONN extends JedisRedisConnection,R>, JedisRedisOperations.JedisClusterCommand<R>, JedisRedisOperations.JedisCommand<R>, JedisRedisOperations.JedisSentinelCommand<R>
client
logger
构造器和说明 |
---|
JedisConnectionOperations(JedisStandaloneClient client) |
限定符和类型 | 方法和说明 |
---|---|
com.buession.lang.Status |
auth(String password)
通过密码进行认证
详情说明
http://redisdoc.com/client_and_server/auth.html
|
com.buession.lang.Status |
auth(String user,
String password)
通过密码进行认证
详情说明 http://redisdoc.com/client_and_server/auth.html
|
com.buession.lang.Status |
clientCaching(boolean isYes)
This command controls the tracking of the keys in the next command executed by the connection,
when tracking is enabled in OPTIN or OPTOUT mode
详情说明 https://redis.io/commands/client-caching/
|
String |
clientGetName()
获取连接时设置的名字
详情说明 http://redisdoc.com/client_and_server/client_getname.html
|
Integer |
clientGetRedir()
This command returns the client ID we are redirecting our tracking notifications to
详情说明 https://redis.io/commands/client-getredir/
|
Long |
clientId()
返回当前连接的 ID
详情说明 http://www.redis.cn/commands/client-id.html
|
Client |
clientInfo()
The command returns information and statistics about the current client connection in a mostly human readable format
详情说明 https://redis.io/commands/client-info/
|
com.buession.lang.Status |
clientKill(String host,
int port)
关闭地址为 host:port 的客户端
详情说明 http://redisdoc.com/client_and_server/client_kill.html
|
List<Client> |
clientList()
获取所有连接到服务器的客户端信息和统计数据
详情说明 http://redisdoc.com/client_and_server/client_list.html
|
List<Client> |
clientList(ClientType clientType)
获取所有连接到服务器的客户端信息和统计数据
详情说明 http://redisdoc.com/client_and_server/client_list.html
|
com.buession.lang.Status |
clientPause(int timeout)
将所有客户端的访问暂停给定的毫秒数
详情说明 http://www.redis.cn/commands/client-pause.html
|
com.buession.lang.Status |
clientReply(ClientReply option)
当需要完全禁用redis服务器对当前客户端的回复时可使用该命令
详情说明 http://www.redis.cn/commands/client-reply.html
|
com.buession.lang.Status |
clientSetName(byte[] name)
为当前连接分配一个名字
详情说明 http://redisdoc.com/client_and_server/client_setname.html
|
com.buession.lang.Status |
clientSetName(String name)
为当前连接分配一个名字
详情说明 http://redisdoc.com/client_and_server/client_setname.html
|
com.buession.lang.Status |
clientUnblock(int clientId)
该命令可以通过其他连接解除客户端的阻塞
详情说明 http://www.redis.cn/commands/client-unblock.html
|
com.buession.lang.Status |
clientUnblock(int clientId,
ClientUnblockType type)
该命令可以通过其他连接解除客户端的阻塞
详情说明 http://www.redis.cn/commands/client-unblock.html
|
byte[] |
echo(byte[] str)
打印一个特定的字符串
详情说明 http://www.redis.cn/commands/echo.html
|
String |
echo(String str)
打印一个特定的字符串
详情说明 http://www.redis.cn/commands/echo.html
|
com.buession.lang.Status |
ping()
使用客户端向 Redis 服务器发送一个 PING ,如果服务器运作正常的话,会返回一个 PONG;
通常用于测试与服务器的连接是否仍然生效,或者用于测量延迟值
详情说明 http://www.redis.cn/commands/ping.html
|
com.buession.lang.Status |
quit()
请求服务器关闭与当前客户端的连接
详情说明 http://www.redis.cn/commands/quit.html
|
com.buession.lang.Status |
reset()
This command performs a full reset of the connection’s server-side context,
mimicking the effect of disconnecting and reconnecting again.
|
com.buession.lang.Status |
select(int db)
切换到指定的数据库
详情说明 http://redisdoc.com/database/select.html
|
auth, auth
public JedisConnectionOperations(JedisStandaloneClient client)
public com.buession.lang.Status auth(String user, String password)
ConnectionCommands
user
- 用户账号password
- 密码public com.buession.lang.Status auth(String password)
ConnectionCommands
password
- 密码public String echo(String str)
ConnectionCommands
str
- 待打印的字符串public byte[] echo(byte[] str)
ConnectionCommands
str
- 待打印的字符串public com.buession.lang.Status ping()
ConnectionCommands
public com.buession.lang.Status reset()
ConnectionCommands
public com.buession.lang.Status quit()
ConnectionCommands
public com.buession.lang.Status select(int db)
ConnectionCommands
db
- 数据库索引号public com.buession.lang.Status clientCaching(boolean isYes)
ConnectionCommands
isYes
- Yes / Nopublic Long clientId()
ConnectionCommands
public com.buession.lang.Status clientSetName(String name)
ConnectionCommands
详情说明 http://redisdoc.com/client_and_server/client_setname.html
name
- 名字public com.buession.lang.Status clientSetName(byte[] name)
ConnectionCommands
详情说明 http://redisdoc.com/client_and_server/client_setname.html
name
- 名字public String clientGetName()
ConnectionCommands
详情说明 http://redisdoc.com/client_and_server/client_getname.html
public Integer clientGetRedir()
ConnectionCommands
public List<Client> clientList()
ConnectionCommands
public List<Client> clientList(ClientType clientType)
ConnectionCommands
clientType
- 客户端类型public Client clientInfo()
ConnectionCommands
public com.buession.lang.Status clientPause(int timeout)
ConnectionCommands
timeout
- 暂停时间(单位:毫秒)public com.buession.lang.Status clientReply(ClientReply option)
ConnectionCommands
option
- 选项public com.buession.lang.Status clientKill(String host, int port)
ConnectionCommands
host
- 客户端地址port
- 客户端端口public com.buession.lang.Status clientUnblock(int clientId)
ConnectionCommands
clientId
- 客户端 IDpublic com.buession.lang.Status clientUnblock(int clientId, ClientUnblockType type)
ConnectionCommands
clientId
- 客户端 IDtype
- typeCopyright © 2023 buession.com Inc.. All rights reserved.