Interface ControlCommands

All Superinterfaces:
AccessControlLogCommands, ClientCommands
All Known Implementing Classes:
Jedis

public interface ControlCommands extends AccessControlLogCommands, ClientCommands
The interface about Redis management command
  • Method Details

    • role

      List<Object> role()
      Provide information on the role of a Redis instance in the context of replication, by returning if the instance is currently a master, slave, or sentinel. The command also returns additional information about the state of the replication (if the role is master or slave) or the list of monitored master names (if the role is sentinel).
      Returns:
      The information on the role of a Redis instance
    • objectRefcount

      Long objectRefcount(String key)
      Returns the reference count of the stored at key.
      Parameters:
      key - The key in Redis server
      Returns:
      The reference count of the stored at key
    • objectEncoding

      String objectEncoding(String key)
      Returns the internal encoding for the Redis object stored at key.

      See for details: OBJECT ENCODING key

      Parameters:
      key - The key in Redis server
      Returns:
      The number of references
    • objectIdletime

      Long objectIdletime(String key)
      Returns the time in seconds since the last access to the value stored at key. The command is only available when the maxmemory-policy configuration directive is not set to one of the LFU policies.
      Parameters:
      key - The key in Redis server
      Returns:
      The idle time in seconds
    • objectHelp

      List<String> objectHelp()
      Returns the object subcommands and usages.
      Returns:
      object subcommands and usages
    • objectFreq

      Long objectFreq(String key)
      Returns the logarithmic access frequency counter of a Redis object stored at key.

      The command is only available when the maxmemory-policy configuration directive is set to one of the LFU policies.

      Parameters:
      key - The key in Redis server
      Returns:
      The counter's value
    • memoryDoctor

      String memoryDoctor()
      Reports about different memory-related issues that the Redis server experiences, and advises about possible remedies.
    • memoryUsage

      Long memoryUsage(String key)
      Reports the number of bytes that a key and its value require to be stored in RAM. The reported usage is the total of memory allocations for data and administrative overheads that a key its value require.

      See for details: MEMORY USAGE key

      Parameters:
      key - The key in Redis server
      Returns:
      The memory usage in bytes, or nil when the key does not exist
    • memoryUsage

      Long memoryUsage(String key, int samples)
      Reports the number of bytes that a key and its value require to be stored in RAM. The reported usage is the total of memory allocations for data and administrative overheads that a key its value require.

      See for details: MEMORY USAGE key SAMPLES count

      Parameters:
      key - The key in Redis server
      Returns:
      The memory usage in bytes, or nil when the key does not exist
    • memoryPurge

      String memoryPurge()
      Attempts to purge dirty pages so these can be reclaimed by the allocator.
      Returns:
      OK
    • memoryStats

      Map<String,Object> memoryStats()
      Returns an Array reply about the memory usage of the server.
      Returns:
      nested list of memory usage metrics and their values