Programmer Reference : Redis : EsRedisServerCommands
EsRedisServerCommands
Description
Provides an API for the Redis Server commands. These commands are used for managing the Redis server itself, such as flushing the database, checking server info, and managing clients.
This command group is accessed via EsRedisClient>>server.
Class Methods
None
Instance Methods
acl:args:
  Manage the Access Control List.
    
     Arguments:
        aSubcommand - <String> The ACL subcommand (e.g., 'LOAD', 'SAVE', 'LIST').
        aCollectionOfArgs - <Collection> The arguments for the subcommand.
     Answers:
        <Object> The result depends on the subcommand.
        <EsFuture> In async mode, a future that completes with the result.
auth:
  Authenticate the connection using a password (for the default user).
    
    Arguments:
        password - <String> The password defined for the default user.
    Answers:
        <String> 'OK' if authentication is successful.
        <EsFuture> In async mode, a future that completes with the result.
authUser:password:
  Authenticate the connection using a Redis 6+ ACL-style username and password.
    
    Arguments:
        username - <String> The Redis ACL username.
        password - <String> The password associated with the username.
    Answers:
        <String> 'OK' if authentication is successful.
        <EsFuture> In async mode, a future that completes with the result.
bgrewriteaof
  Asynchronously rewrite the append-only file.
    
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
bgsave
  Asynchronously save the dataset to disk.
    
     Answers:
        <String> A status string.
        <EsFuture> In async mode, a future that completes with the result.
bgsaveSchedule
  Asynchronously save the dataset to disk, but only if a save is not already in progress.
    
     Answers:
        <String> A status string.
        <EsFuture> In async mode, a future that completes with the result.
client:args:
  Manage client connections.
    
     Arguments:
        aSubcommand - <String> The CLIENT subcommand (e.g., 'KILL', 'LIST', 'GETNAME').
        aCollectionOfArgs - <Collection> The arguments for the subcommand.
     Answers:
        <Object> The result depends on the subcommand. String-like replies are
            normalized to a String for protocol consistency.
        <EsFuture> In async mode, a future that completes with the result.
clientInfo
  Get information about the current client connection.
    
     Answers:
        <String> A string containing client information.
        <EsFuture> In async mode, a future that completes with the result.
clientNoEvict:
  Set the client eviction policy.
    
     Arguments:
        aBoolean - <Boolean> true for ON, false for OFF.
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
clientNoTouch:
  Disable or enable touch events for the client.
    
     Arguments:
        aBoolean - <Boolean> true for ON, false for OFF.
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
cluster:args:
  Manage Redis Cluster.
    
     Arguments:
        aSubcommand - <String> The CLUSTER subcommand.
        aCollectionOfArgs - <Collection> The arguments for the subcommand.
     Answers:
        <Object> The result depends on the subcommand.
        <EsFuture> In async mode, a future that completes with the result.
command
  Get an array of details about all Redis commands.
    
     Answers:
        <Array> An array of command details.
        <EsFuture> In async mode, a future that completes with the result.
commandDocs:
  Get the documentation for specific Redis commands.
    
     Arguments:
        aCollectionOfCommandNames - <Collection> The names of the commands to get docs for.
     Answers:
        <Dictionary> A dictionary of command documentation.
        <EsFuture> In async mode, a future that completes with the result.
commandGetKeysAndFlags:
  Extract keys and flags from a command.
    
     Arguments:
        aCollectionOfArgs - <Collection> The command and its arguments.
     Answers:
        <Array> An array containing keys and flags.
        <EsFuture> In async mode, a future that completes with the result.
commandInfo:
  Get an array of details for specific Redis commands.
    
     Arguments:
        aCollectionOfCommandNames - <Collection> The names of the commands to get info for.
     Answers:
        <Array> An array of command details.
        <EsFuture> In async mode, a future that completes with the result.
commandList:
  Get a list of commands matching a filter.
    
     Arguments:
        aFilter - <String> A filter, e.g., 'FILTERBY MODULE <module-name>'.
     Answers:
        <Array> An array of command names.
        <EsFuture> In async mode, a future that completes with the result.
configGet:
  Get the value of a configuration parameter.
    
     Arguments:
        aParameter - <String> The configuration parameter (e.g., 'timeout').
     Answers:
        <Dictionary> A dictionary of the parameter and its value.
        <EsFuture> In async mode, a future that completes with the result.
configHelp
  Get help text for the CONFIG command.
    
     Answers:
        <Array> An array of strings containing help text.
        <EsFuture> In async mode, a future that completes with the result.
configResetstat
  Reset the statistics reported by INFO.
    
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
configRewrite
  Rewrite the redis.conf file on disk.
    
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
configSet:value:
  Set a configuration parameter to the given value.
    
     Arguments:
        aParameter - <String> The parameter to set.
        aValue - <Object> The new value.
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
dbsize
  Return the number of keys in the selected database.
     
     Answers:
        <Integer> The number of keys.
        <EsFuture> In async mode, a future that completes with the result.
discard
  Flushes all commands issued after a MULTI command, effectively canceling
     the transaction.
    
     Arguments:
        None.
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with 'OK'.
     Raises:
        <EsRedisException> if called without a preceding MULTI command.
echo:
  Echo the provided string back to the client.
    
    Arguments:
        aString - <String> Any printable string.
    Answers:
        <String> The same string echoed back.
        <EsFuture> In async mode, a future that completes with the echoed value.
exec
  Executes all commands issued after a MULTI command in an atomic,
     sequential manner.
    
     Arguments:
        None.
     Answers:
        <Array> An array of replies, one for each command in the transaction,
                in the order they were queued. If the transaction was aborted
                due to a watched key being modified, answers nil.
        <EsFuture> In async mode, a future that completes with the array of replies or nil.
     Raises:
        <EsRedisException> if called without a preceding MULTI command.
failover
  Start a manual failover of the master to a replica.
    
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
flushAll
  Remove all keys from all databases.
     
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
flushDb
  Remove all keys from the current database.
     
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
hello:
  Switch the connection to a different protocol.
    
     Arguments:
        aProtoVer - <Integer> The protocol version to switch to.
     Answers:
        <Dictionary> A dictionary of connection information.
        <EsFuture> In async mode, a future that completes with the result.
info
  Get information and statistics about the server.
     
     Answers:
        <String> A multi-line string containing server information. The reply
            is normalized to a String for protocol consistency.
        <EsFuture> In async mode, a future that completes with the result.
lastsave
  Get the UNIX timestamp of the last successful save to disk.
    
     Answers:
        <Integer> The UNIX timestamp.
        <EsFuture> In async mode, a future that completes with the result.
latency:args:
  Report latency statistics.
    
     Arguments:
        aSubcommand - <String> The LATENCY subcommand (e.g., 'DOCTOR', 'HISTORY').
        aCollectionOfArgs - <Collection> The arguments for the subcommand.
     Answers:
        <Object> The result depends on the subcommand.
        <EsFuture> In async mode, a future that completes with the result.
latencyDoctor
  Get a latency diagnosis report.
    
     Answers:
        <String> The latency report. The reply is normalized to a String
            for protocol consistency.
        <EsFuture> In async mode, a future that completes with the result.
latencyGraph:
  Get an ASCII art graph of a latency event.
    
     Arguments:
        anEvent - <String> The name of the event.
     Answers:
        <String> The latency graph.
        <EsFuture> In async mode, a future that completes with the result.
latencyHistogram:
  Get a histogram of latency for an event.
    
     Arguments:
        anEvent - <String> The name of the event.
     Answers:
        <Dictionary> A dictionary representing the histogram.
        <EsFuture> In async mode, a future that completes with the result.
latencyLatest
  Get the latest latency events.
    
     Answers:
        <Dictionary> A dictionary of the latest latency events.
        <EsFuture> In async mode, a future that completes with the result.
latencyReset:
  Reset latency data for specific events.
    
     Arguments:
        aCollectionOfEvents - <Collection> The names of the events to reset.
     Answers:
        <Integer> The number of events reset.
        <EsFuture> In async mode, a future that completes with the result.
lolwut
  Display a piece of generative art and information about the Redis version.
    
     Answers:
        <String> The LOLWUT output. The reply is normalized to a String
            for protocol consistency.
        <EsFuture> In async mode, a future that completes with the result.
memory:args:
  Report memory usage statistics.
    
     Arguments:
        aSubcommand - <String> The MEMORY subcommand (e.g., 'USAGE', 'STATS').
        aCollectionOfArgs - <Collection> The arguments for the subcommand.
     Answers:
        <Object> The result depends on the subcommand.
        <EsFuture> In async mode, a future that completes with the result.
memoryDoctor
  Get a memory diagnosis report.
    
     Answers:
        <String> The memory report. The reply is normalized to a String
            for protocol consistency.
        <EsFuture> In async mode, a future that completes with the result.
memoryMallocStats
  Get internal memory allocator statistics.
    
     Answers:
        <String> The allocator stats. The reply is normalized to a String
            for protocol consistency.
        <EsFuture> In async mode, a future that completes with the result.
memoryPurge
  Ask the allocator to release memory.
    
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
module:args:
  Manage Redis modules.
    
     Arguments:
        aSubcommand - <String> The MODULE subcommand (e.g., 'LOAD', 'LIST', 'UNLOAD').
        aCollectionOfArgs - <Collection> The arguments for the subcommand.
     Answers:
        <Object> The result depends on the subcommand.
        <EsFuture> In async mode, a future that completes with the result.
monitor
  Listen for all requests received by the server in real-time.
    
     Answers:
        <String> A stream of commands. This command is blocking.
        <EsFuture> In async mode, a future that completes with the result.
multi
  Marks the start of a transaction block. All subsequent commands will be
     queued for atomic execution upon receiving an EXEC command.
    
     Arguments:
        None.
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with 'OK'.
ping
  Ping the server to test if a connection is still alive.
     
     Example:
        self assert: [client server ping = 'PONG'].
     
     Answers:
        <String> 'PONG' if the connection is alive.
        <EsFuture> In async mode, a future that completes with the result.
quit
  Request the server to close the client connection after processing the command.
    
    Arguments:
        None.
    Answers:
        <String> 'OK' or nothing, as the connection will be closed.
        <EsFuture> In async mode, a future that completes before disconnect.
replicaof:port:
  Make the server a replica of another instance.
    
     Arguments:
        aHost - <String> The host of the master instance.
        anInteger - <Integer> The port of the master instance.
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
role
  Return the role of the instance in the context of replication.
    
     Answers:
        <Array> An array describing the role and replication status.
        <EsFuture> In async mode, a future that completes with the result.
save
  Synchronously save the dataset to disk.
    
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
select:
  Switch the currently selected Redis logical database.
    
    Arguments:
        dbIndex - <Integer> The database index to select (usually 0–15).
    Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
shutdown
  Synchronously save the dataset to disk and then shut down the server.
    
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
shutdownNoSave
  Shutdown the server without saving.
    
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
shutdownSave
  Shutdown the server, forcing a save even if one is configured not to happen.
    
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
slowlogGet
  Get the Redis slow queries log.
    
     Answers:
        <Array> An array of slow log entries.
        <EsFuture> In async mode, a future that completes with the result.
slowlogGet:
  Get a specified number of entries from the Redis slow queries log.
    
     Arguments:
        anInteger - <Integer> The number of entries to return.
     Answers:
        <Array> An array of slow log entries.
        <EsFuture> In async mode, a future that completes with the result.
slowlogLen
  Get the length of the Redis slow queries log.
    
     Answers:
        <Integer> The number of entries in the slow log.
        <EsFuture> In async mode, a future that completes with the result.
slowlogReset
  Reset the Redis slow queries log.
    
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
swapdb:with:
  Swap two Redis databases.
    
     Arguments:
        anIndex1 - <Integer> The first database index.
        anIndex2 - <Integer> The second database index.
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
time
  Return the current server time.
     
     Answers:
        <Array> A two-element array: [unix timestamp, microseconds].
        <EsFuture> In async mode, a future that completes with the result.
unwatch
  Flushes all the previously watched keys for a transaction.
     If you call EXEC or DISCARD, there's no need to manually call UNWATCH.
    
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with 'OK'.
watch:
  Marks the given keys to be watched for optimistic locking prior to a
     transaction. If any of the watched keys are modified before EXEC is
     called, the entire transaction will be aborted.
    
     Arguments:
        aKeyOrCollection - <String | Collection> The key or keys to watch.
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with 'OK'.
Last modified date: 01/22/2026