Skip to content

Commit

Permalink
add javadoc for ConfigCommands (#2833)
Browse files Browse the repository at this point in the history
* add javadoc for ConfigCommands

* Apply suggestions from code review

Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
  • Loading branch information
zeekling and sazzad16 committed Jan 21, 2022
1 parent 49bf437 commit 192a43a
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions src/main/java/redis/clients/jedis/commands/ConfigCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,76 @@

import java.util.List;

/**
* The interface about managing configuration parameters of Redis server.
*/
public interface ConfigCommands {

/**
* Used to read the configuration parameters of Redis server.
*
* @param pattern config name
* @return config value of Redis server
*/
List<String> configGet(String pattern);

/**
* Used to read the configuration parameters of Redis server.
*
* @param pattern name of Redis server's configuration
* @return value of Redis server's configuration
*/
List<byte[]> configGet(byte[] pattern);

/**
* Used in order to reconfigure the Redis server at run time without
* the need to restart.
*
* @param parameter name of Redis server's configuration
* @param value value of Redis server's configuration
* @return OK when the configuration was set properly.
* Otherwise, an error is returned.
*/
String configSet(String parameter, String value);

/**
* Used in order to reconfigure the Redis server at run time without
* the need to restart.
*
* @param parameter name of Redis server's configuration
* @param value value of Redis server's configuration
* @return OK when the configuration was set properly.
* Otherwise, an error is returned.
*/
String configSet(byte[] parameter, byte[] value);

/**
* Resets the statistics reported by Redis using the INFO command.
* <p>
* These are the counters that are reset:
* <p>
* 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
*
* @return always OK.
*/
String configResetStat();

/**
* 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.
*
* @return OK when the configuration was rewritten properly.
* Otherwise, an error is returned.
*/
String configRewrite();

}

0 comments on commit 192a43a

Please sign in to comment.