Package redis.clients.jedis.commands
Interface ClientCommands
- All Known Subinterfaces:
ControlCommands
- All Known Implementing Classes:
Jedis
public interface ClientCommands
The interface contain all the commands about client.
The params is String encoded in uft-8
-
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the current connection as set by CLIENT SETNAMElongclientId()Returns the ID of the current connection.Returns information and statistics about the current client connection in a mostly human readable format.clientKill(String ipPort) Close a given client connection.clientKill(String ip, int port) Close a given client connection.longclientKill(ClientKillParams params) Close a given client connection.Returns information and statistics about the client connections server in a mostly human readable format.clientList(long... clientIds) Returns information and statistics about the client connections server in a mostly human readable format filter by client ids.clientList(ClientType type) Returns information and statistics about the client connections server in a mostly human readable format filter by client type.Turn off the client eviction mode for the current connection.Turn on the client eviction mode for the current connection.Turn off CLIENT NO-TOUCHTurn on CLIENT NO-TOUCHclientPause(long timeout) A connections control command able to suspend all the Redis clients for the specified amount of time (in milliseconds)clientPause(long timeout, ClientPauseMode mode) A connections control command able to suspend all the Redis clients for the specified amount of time (in milliseconds)clientSetInfo(ClientAttributeOption attr, String value) client set info command Since redis 7.2clientSetname(String name) Assigns a name to the current connection.longclientUnblock(long clientId) Unblock from a different connection, a client blocked in a blocking operation, such as for instance BRPOP or XREAD or WAIT.longclientUnblock(long clientId, UnblockType unblockType) Unblock from a different connection, a client blocked in a blocking operation, such as for instance BRPOP or XREAD or WAIT.CLIENT UNPAUSE is used to resume command processing for all clients that were paused by CLIENT PAUSE.
-
Method Details
-
clientKill
Close a given client connection.- Parameters:
ipPort- The ip:port should match a line returned by the CLIENT LIST command (addr field).- Returns:
- Close success return OK
-
clientKill
Close a given client connection.- Parameters:
ip- The ip should match a line returned by the CLIENT LIST command (addr field).port- The port should match a line returned by the CLIENT LIST command (addr field).- Returns:
- Close success return OK
-
clientKill
Close a given client connection.- Parameters:
params- Connection info will be closed- Returns:
- Close success return OK
-
clientGetname
String clientGetname()Returns the name of the current connection as set by CLIENT SETNAME- Returns:
- Current connect name
-
clientList
String clientList()Returns information and statistics about the client connections server in a mostly human readable format.- Returns:
- All clients info connected to redis-server
-
clientList
Returns information and statistics about the client connections server in a mostly human readable format filter by client type.- Returns:
- All clients info connected to redis-server
-
clientList
Returns information and statistics about the client connections server in a mostly human readable format filter by client ids.- Parameters:
clientIds- Unique 64-bit client IDs- Returns:
- All clients info connected to redis-server
-
clientInfo
String clientInfo()Returns information and statistics about the current client connection in a mostly human readable format.- Returns:
- Information and statistics about the current client connection
-
clientSetInfo
client set info command Since redis 7.2- Parameters:
attr- the attr optionvalue- the value- Returns:
- OK or error
-
clientSetname
Assigns a name to the current connection.- Parameters:
name- current connection name- Returns:
- OK if the connection name was successfully set.
-
clientId
long clientId()Returns the ID of the current connection.- Returns:
- The id of the client.
-
clientUnblock
long clientUnblock(long clientId) Unblock from a different connection, a client blocked in a blocking operation, such as for instance BRPOP or XREAD or WAIT.- Parameters:
clientId- The id of the client- Returns:
- 1 if the client was unblocked successfully, 0 if the client wasn't unblocked.
-
clientUnblock
Unblock from a different connection, a client blocked in a blocking operation, such as for instance BRPOP or XREAD or WAIT.- Parameters:
clientId- The id of the clientunblockType- TIMEOUT|ERROR- Returns:
- 1 if the client was unblocked successfully, 0 if the client wasn't unblocked.
-
clientPause
A connections control command able to suspend all the Redis clients for the specified amount of time (in milliseconds)- Parameters:
timeout- WRITE|ALL- Returns:
- The command returns OK or an error if the timeout is invalid.
-
clientPause
A connections control command able to suspend all the Redis clients for the specified amount of time (in milliseconds)- Parameters:
timeout- Command timeoutmode- WRITE|ALL- Returns:
- The command returns OK or an error if the timeout is invalid.
-
clientUnpause
String clientUnpause()CLIENT UNPAUSE is used to resume command processing for all clients that were paused by CLIENT PAUSE.- Returns:
- OK
-
clientNoEvictOn
String clientNoEvictOn()Turn on the client eviction mode for the current connection.- Returns:
- OK
-
clientNoEvictOff
String clientNoEvictOff()Turn off the client eviction mode for the current connection.- Returns:
- OK
-
clientNoTouchOn
String clientNoTouchOn()Turn on CLIENT NO-TOUCH- Returns:
- OK
-
clientNoTouchOff
String clientNoTouchOff()Turn off CLIENT NO-TOUCH- Returns:
- OK
-