Interface ConfigCommands

All Known Subinterfaces:
GenericControlCommands
All Known Implementing Classes:
Jedis

public interface ConfigCommands
The interface about managing configuration parameters of Redis server.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<byte[]>
    configGet(byte[] pattern)
    Used to read the configuration parameters of Redis server.
    List<byte[]>
    configGet(byte[]... patterns)
    Used to read the configuration parameters of Redis server.
    configGet(String pattern)
    Used to read the configuration parameters of Redis server.
    configGet(String... patterns)
    Used to read the configuration parameters of Redis server.
    Resets the statistics reported by Redis using the INFO command.
    Rewrites the redis.conf file the server was started with, applying the minimal changes needed to make it reflect the configuration currently used by the server, which may be different compared to the original one because of the use of the CONFIG SET command.
    configSet(byte[]... parameterValues)
     
    configSet(byte[] parameter, byte[] value)
    Used in order to reconfigure the Redis server at run time without the need to restart.
    configSet(String... parameterValues)
     
    configSet(String parameter, String value)
    Used in order to reconfigure the Redis server at run time without the need to restart.
  • Method Details

    • configGet

      List<String> configGet(String pattern)
      Used to read the configuration parameters of Redis server.
      Parameters:
      pattern - name of Redis server's configuration
      Returns:
      config value of Redis server
    • configGet

      List<String> configGet(String... patterns)
      Used to read the configuration parameters of Redis server.
      Parameters:
      patterns - names of Redis server's configuration
      Returns:
      values of Redis server's configuration
    • configGet

      List<byte[]> configGet(byte[] pattern)
      Used to read the configuration parameters of Redis server.
      Parameters:
      pattern - name of Redis server's configuration
      Returns:
      value of Redis server's configuration
    • configGet

      List<byte[]> configGet(byte[]... patterns)
      Used to read the configuration parameters of Redis server.
      Parameters:
      patterns - names of Redis server's configuration
      Returns:
      values of Redis server's configuration
    • configSet

      String configSet(String parameter, String value)
      Used in order to reconfigure the Redis server at run time without the need to restart.
      Parameters:
      parameter - name of Redis server's configuration
      value - value of Redis server's configuration
      Returns:
      OK when the configuration was set properly. Otherwise, an error is returned.
    • configSet

      String configSet(String... parameterValues)
    • configSet

      String configSet(byte[] parameter, byte[] value)
      Used in order to reconfigure the Redis server at run time without the need to restart.
      Parameters:
      parameter - name of Redis server's configuration
      value - value of Redis server's configuration
      Returns:
      OK when the configuration was set properly. Otherwise, an error is returned.
    • configSet

      String configSet(byte[]... parameterValues)
    • configResetStat

      String configResetStat()
      Resets the statistics reported by Redis using the INFO command.

      These are the counters that are reset:

      1) Keyspace hits 2) Keyspace misses 3) Number of commands processed 4) Number of connections received 5) Number of expired keys 6) Number of rejected connections 7) Latest fork(2) time 8) The aof_delayed_fsync counter

      Returns:
      always OK.
    • configRewrite

      String configRewrite()
      Rewrites the redis.conf file the server was started with, applying the minimal changes needed to make it reflect the configuration currently used by the server, which may be different compared to the original one because of the use of the CONFIG SET command.
      Returns:
      OK when the configuration was rewritten properly. Otherwise, an error is returned.