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 Details

    • clientKill

      String clientKill(String ipPort)
      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

      String clientKill(String ip, int port)
      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

      long clientKill(ClientKillParams params)
      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

      String clientList(ClientType type)
      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

      String clientList(long... clientIds)
      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

      String clientSetInfo(ClientAttributeOption attr, String value)
      client set info command Since redis 7.2
      Parameters:
      attr - the attr option
      value - the value
      Returns:
      OK or error
    • clientSetname

      String clientSetname(String name)
      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

      long clientUnblock(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.
      Parameters:
      clientId - The id of the client
      unblockType - TIMEOUT|ERROR
      Returns:
      1 if the client was unblocked successfully, 0 if the client wasn't unblocked.
    • clientPause

      String clientPause(long timeout)
      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

      String clientPause(long timeout, ClientPauseMode mode)
      A connections control command able to suspend all the Redis clients for the specified amount of time (in milliseconds)
      Parameters:
      timeout - Command timeout
      mode - 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()
      Returns:
      OK
    • clientNoTouchOff

      String clientNoTouchOff()
      Returns:
      OK