Package io.lettuce.core.api.async
Interface RedisServerAsyncCommands<K,V>
-
- Type Parameters:
K
- Key type.V
- Value type.
- All Known Subinterfaces:
RedisAdvancedClusterAsyncCommands<K,V>
,RedisAsyncCommands<K,V>
,RedisClusterAsyncCommands<K,V>
,RedisClusterPubSubAsyncCommands<K,V>
,RedisPubSubAsyncCommands<K,V>
- All Known Implementing Classes:
AbstractRedisAsyncCommands
,RedisAdvancedClusterAsyncCommandsImpl
,RedisAsyncCommandsImpl
,RedisClusterPubSubAsyncCommandsImpl
,RedisPubSubAsyncCommandsImpl
public interface RedisServerAsyncCommands<K,V>
Asynchronous executed commands for Server Control.- Since:
- 4.0
- Author:
- Mark Paluch
- Generated class:
- by io.lettuce.apigenerator.CreateAsyncApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description RedisFuture<String>
bgrewriteaof()
Asynchronously rewrite the append-only file.RedisFuture<String>
bgsave()
Asynchronously save the dataset to disk.RedisFuture<String>
clientCaching(boolean enabled)
Control tracking of keys in the context of server-assisted client cache invalidation.RedisFuture<K>
clientGetname()
Get the current connection name.RedisFuture<Long>
clientGetredir()
Returns the client ID we are redirecting our tracking notifications to.RedisFuture<Long>
clientId()
Get the id of the current connection.RedisFuture<String>
clientInfo()
Get the list of the current client connection.RedisFuture<Long>
clientKill(KillArgs killArgs)
Kill connections of clients which are filtered bykillArgs
.RedisFuture<String>
clientKill(String addr)
Kill the connection of a client identified by ip:port.RedisFuture<String>
clientList()
Get the list of client connections.RedisFuture<String>
clientList(ClientListArgs clientListArgs)
Get the list of client connections which are filtered byclientListArgs
.RedisFuture<String>
clientNoEvict(boolean on)
Sets the client eviction mode for the current connection.RedisFuture<String>
clientPause(long timeout)
Stop processing commands from clients for some time.RedisFuture<String>
clientSetinfo(String key, String value)
Assign various info attributes to the current connection.RedisFuture<String>
clientSetname(K name)
Set the current connection name.RedisFuture<String>
clientTracking(TrackingArgs args)
Enables the tracking feature of the Redis server, that is used for server assisted client side caching.RedisFuture<Long>
clientUnblock(long id, UnblockType type)
Unblock the specified blocked client.RedisFuture<List<Object>>
command()
Returns an array reply of details about all Redis commands.RedisFuture<Long>
commandCount()
Get total number of Redis commands.RedisFuture<List<Object>>
commandInfo(CommandType... commands)
Returns an array reply of details about the requested commands.RedisFuture<List<Object>>
commandInfo(String... commands)
Returns an array reply of details about the requested commands.RedisFuture<Map<String,String>>
configGet(String parameter)
Get the value of a configuration parameter.RedisFuture<Map<String,String>>
configGet(String... parameters)
Get the value of multiple pattern parameters.RedisFuture<String>
configResetstat()
Reset the stats returned by INFO.RedisFuture<String>
configRewrite()
Rewrite the configuration file with the in memory configuration.RedisFuture<String>
configSet(String parameter, String value)
Set a configuration parameter to the given value.RedisFuture<String>
configSet(Map<String,String> kvs)
Set multiple parameters to the given value.RedisFuture<Long>
dbsize()
Return the number of keys in the selected database.RedisFuture<String>
debugCrashAndRecover(Long delay)
Crash and recover.RedisFuture<String>
debugHtstats(int db)
Get debugging information about the internal hash-table state.RedisFuture<String>
debugObject(K key)
Get debugging information about a key.void
debugOom()
Make the server crash: Out of memory.RedisFuture<String>
debugReload()
Save RDB, clear the database and reload RDB.RedisFuture<String>
debugRestart(Long delay)
Restart the server gracefully.RedisFuture<String>
debugSdslen(K key)
Get debugging information about the internal SDS length.void
debugSegfault()
Make the server crash: Invalid pointer access.RedisFuture<String>
flushall()
Remove all keys from all databases.RedisFuture<String>
flushall(FlushMode flushMode)
Remove all keys from all databases using the specifiedFlushMode
.RedisFuture<String>
flushallAsync()
Deprecated.since 6.1, useflushall(FlushMode)
instead.RedisFuture<String>
flushdb()
Remove all keys from the current database.RedisFuture<String>
flushdb(FlushMode flushMode)
Remove all keys from the current database using the specifiedFlushMode
.RedisFuture<String>
flushdbAsync()
Deprecated.since 6.1, useflushdb(FlushMode)
instead.RedisFuture<String>
info()
Get information and statistics about the server.RedisFuture<String>
info(String section)
Get information and statistics about the server.RedisFuture<Date>
lastsave()
Get the UNIX time stamp of the last successful save to disk.RedisFuture<Long>
memoryUsage(K key)
Reports the number of bytes that a key and its value require to be stored in RAM.RedisFuture<String>
replicaof(String host, int port)
Make the server a replica of another instance.RedisFuture<String>
replicaofNoOne()
Promote server as master.RedisFuture<String>
save()
Synchronously save the dataset to disk.void
shutdown(boolean save)
Synchronously save the dataset to disk and then shut down the server.void
shutdown(ShutdownArgs args)
Synchronously save the dataset to disk and then shutdown the server.RedisFuture<String>
slaveof(String host, int port)
Deprecated.since 6.1.7, usereplicaof(String, int)
instead.RedisFuture<String>
slaveofNoOne()
Deprecated.since 6.1.7, usereplicaofNoOne()
instead.RedisFuture<List<Object>>
slowlogGet()
Read the slow log.RedisFuture<List<Object>>
slowlogGet(int count)
Read the slow log.RedisFuture<Long>
slowlogLen()
Obtaining the current length of the slow log.RedisFuture<String>
slowlogReset()
Resetting the slow log.RedisFuture<List<V>>
time()
Return the current server time.
-
-
-
Method Detail
-
bgrewriteaof
RedisFuture<String> bgrewriteaof()
Asynchronously rewrite the append-only file.- Returns:
- String simple-string-reply always
OK
.
-
bgsave
RedisFuture<String> bgsave()
Asynchronously save the dataset to disk.- Returns:
- String simple-string-reply.
-
clientCaching
RedisFuture<String> clientCaching(boolean enabled)
Control tracking of keys in the context of server-assisted client cache invalidation.- Parameters:
enabled
-true
to enable key tracking.- Returns:
- String simple-string-reply
OK
. - Since:
- 6.0
-
clientGetname
RedisFuture<K> clientGetname()
Get the current connection name.- Returns:
- K bulk-string-reply The connection name, or a null bulk reply if no name is set.
-
clientGetredir
RedisFuture<Long> clientGetredir()
Returns the client ID we are redirecting our tracking notifications to.- Returns:
- the ID of the client we are redirecting the notifications to. The command returns -1 if client tracking is not enabled, or 0 if client tracking is enabled but we are not redirecting the notifications to any client.
- Since:
- 6.0
-
clientId
RedisFuture<Long> clientId()
Get the id of the current connection.- Returns:
- Long The command just returns the ID of the current connection.
- Since:
- 5.3
-
clientKill
RedisFuture<String> clientKill(String addr)
Kill the connection of a client identified by ip:port.- Parameters:
addr
- ip:port.- Returns:
- String simple-string-reply
OK
if the connection exists and has been closed.
-
clientKill
RedisFuture<Long> clientKill(KillArgs killArgs)
Kill connections of clients which are filtered bykillArgs
.- Parameters:
killArgs
- args for the kill operation.- Returns:
- Long integer-reply number of killed connections.
-
clientList
RedisFuture<String> clientList()
Get the list of client connections.- Returns:
- String bulk-string-reply a unique string, formatted as follows: One client connection per line (separated by LF), each line is composed of a succession of property=value fields separated by a space character.
-
clientList
RedisFuture<String> clientList(ClientListArgs clientListArgs)
Get the list of client connections which are filtered byclientListArgs
.- Returns:
- String bulk-string-reply a unique string, formatted as follows: One client connection per line (separated by LF), each line is composed of a succession of property=value fields separated by a space character.
- Since:
- 6.3
-
clientInfo
RedisFuture<String> clientInfo()
Get the list of the current client connection.- Returns:
- String bulk-string-reply a unique string, formatted as a succession of property=value fields separated by a space character.
- Since:
- 6.3
-
clientNoEvict
RedisFuture<String> clientNoEvict(boolean on)
Sets the client eviction mode for the current connection.- Parameters:
on
-true
will turn eviction mode on, andfalse
will turn it off.- Returns:
- String simple-string-reply
OK
. - Since:
- 6.2
-
clientPause
RedisFuture<String> clientPause(long timeout)
Stop processing commands from clients for some time.- Parameters:
timeout
- the timeout value in milliseconds.- Returns:
- String simple-string-reply The command returns OK or an error if the timeout is invalid.
-
clientSetname
RedisFuture<String> clientSetname(K name)
Set the current connection name.- Parameters:
name
- the client name.- Returns:
- simple-string-reply
OK
if the connection name was successfully set.
-
clientSetinfo
RedisFuture<String> clientSetinfo(String key, String value)
Assign various info attributes to the current connection.- Parameters:
key
- the key.value
- the value.- Returns:
- simple-string-reply
OK
if the connection name was successfully set. - Since:
- 6.3
-
clientTracking
RedisFuture<String> clientTracking(TrackingArgs args)
Enables the tracking feature of the Redis server, that is used for server assisted client side caching. Tracking messages are either available when using the RESP3 protocol or through Pub/Sub notification when using RESP2.- Parameters:
args
- for the CLIENT TRACKING operation.- Returns:
- String simple-string-reply
OK
. - Since:
- 6.0
-
clientUnblock
RedisFuture<Long> clientUnblock(long id, UnblockType type)
Unblock the specified blocked client.- Parameters:
id
- the client id.type
- unblock type.- Returns:
- Long integer-reply number of unblocked connections.
- Since:
- 5.1
-
command
RedisFuture<List<Object>> command()
Returns an array reply of details about all Redis commands.- Returns:
- List<Object> array-reply.
-
commandCount
RedisFuture<Long> commandCount()
Get total number of Redis commands.- Returns:
- Long integer-reply of number of total commands in this Redis server.
-
commandInfo
RedisFuture<List<Object>> commandInfo(String... commands)
Returns an array reply of details about the requested commands.- Parameters:
commands
- the commands to query for.- Returns:
- List<Object> array-reply.
-
commandInfo
RedisFuture<List<Object>> commandInfo(CommandType... commands)
Returns an array reply of details about the requested commands.- Parameters:
commands
- the commands to query for.- Returns:
- List<Object> array-reply.
-
configGet
RedisFuture<Map<String,String>> configGet(String parameter)
Get the value of a configuration parameter.- Parameters:
parameter
- name of the parameter.- Returns:
- Map<String, String> bulk-string-reply.
-
configGet
RedisFuture<Map<String,String>> configGet(String... parameters)
Get the value of multiple pattern parameters.- Parameters:
parameters
- patterns names of Redis server's configuration.- Returns:
- Map<String, String> bulk-string-reply.
- Since:
- 6.2
-
configResetstat
RedisFuture<String> configResetstat()
Reset the stats returned by INFO.- Returns:
- String simple-string-reply always
OK
.
-
configRewrite
RedisFuture<String> configRewrite()
Rewrite the configuration file with the in memory configuration.- Returns:
- String simple-string-reply
OK
when the configuration was rewritten properly. Otherwise an error is returned.
-
configSet
RedisFuture<String> configSet(String parameter, String value)
Set a configuration parameter to the given value.- Parameters:
parameter
- the parameter name.value
- the parameter value.- Returns:
- String simple-string-reply:
OK
when the configuration was set properly. Otherwise an error is returned.
-
configSet
RedisFuture<String> configSet(Map<String,String> kvs)
Set multiple parameters to the given value.- Parameters:
kvs
- the parameter name and value.- Returns:
- String simple-string-reply:
OK
when the configuration was set properly. Otherwise an error is returned. - Since:
- 6.2
-
dbsize
RedisFuture<Long> dbsize()
Return the number of keys in the selected database.- Returns:
- Long integer-reply.
-
debugCrashAndRecover
RedisFuture<String> debugCrashAndRecover(Long delay)
Crash and recover.- Parameters:
delay
- optional delay in milliseconds.- Returns:
- String simple-string-reply.
-
debugHtstats
RedisFuture<String> debugHtstats(int db)
Get debugging information about the internal hash-table state.- Parameters:
db
- the database number.- Returns:
- String simple-string-reply.
-
debugObject
RedisFuture<String> debugObject(K key)
Get debugging information about a key.- Parameters:
key
- the key.- Returns:
- String simple-string-reply.
-
debugOom
void debugOom()
Make the server crash: Out of memory.
-
debugReload
RedisFuture<String> debugReload()
Save RDB, clear the database and reload RDB.- Returns:
- String simple-string-reply The commands returns OK on success.
-
debugRestart
RedisFuture<String> debugRestart(Long delay)
Restart the server gracefully.- Parameters:
delay
- optional delay in milliseconds.- Returns:
- String simple-string-reply.
-
debugSdslen
RedisFuture<String> debugSdslen(K key)
Get debugging information about the internal SDS length.- Parameters:
key
- the key.- Returns:
- String simple-string-reply.
-
debugSegfault
void debugSegfault()
Make the server crash: Invalid pointer access.
-
flushall
RedisFuture<String> flushall()
Remove all keys from all databases.- Returns:
- String simple-string-reply.
-
flushall
RedisFuture<String> flushall(FlushMode flushMode)
Remove all keys from all databases using the specifiedFlushMode
.- Parameters:
flushMode
- the flush mode (sync/async).- Returns:
- String simple-string-reply.
- Since:
- 6.1
-
flushallAsync
@Deprecated RedisFuture<String> flushallAsync()
Deprecated.since 6.1, useflushall(FlushMode)
instead.Remove all keys asynchronously from all databases.- Returns:
- String simple-string-reply.
-
flushdb
RedisFuture<String> flushdb()
Remove all keys from the current database.- Returns:
- String simple-string-reply.
-
flushdb
RedisFuture<String> flushdb(FlushMode flushMode)
Remove all keys from the current database using the specifiedFlushMode
.- Parameters:
flushMode
- the flush mode (sync/async).- Returns:
- String simple-string-reply.
- Since:
- 6.1
-
flushdbAsync
@Deprecated RedisFuture<String> flushdbAsync()
Deprecated.since 6.1, useflushdb(FlushMode)
instead.Remove all keys asynchronously from the current database.- Returns:
- String simple-string-reply.
-
info
RedisFuture<String> info()
Get information and statistics about the server.- Returns:
- String bulk-string-reply as a collection of text lines.
-
info
RedisFuture<String> info(String section)
Get information and statistics about the server.- Parameters:
section
- the section type: string.- Returns:
- String bulk-string-reply as a collection of text lines.
-
lastsave
RedisFuture<Date> lastsave()
Get the UNIX time stamp of the last successful save to disk.- Returns:
- Date integer-reply an UNIX time stamp.
-
memoryUsage
RedisFuture<Long> memoryUsage(K key)
Reports the number of bytes that a key and its value require to be stored in RAM.- Returns:
- memory usage in bytes.
- Since:
- 5.2
-
replicaof
RedisFuture<String> replicaof(String host, int port)
Make the server a replica of another instance.- Parameters:
host
- the host type: string.port
- the port type: string.- Returns:
- String simple-string-reply.
- Since:
- 6.1.7
-
replicaofNoOne
RedisFuture<String> replicaofNoOne()
Promote server as master.- Returns:
- String simple-string-reply.
- Since:
- 6.1.7
-
save
RedisFuture<String> save()
Synchronously save the dataset to disk.- Returns:
- String simple-string-reply The commands returns OK on success.
-
shutdown
void shutdown(boolean save)
Synchronously save the dataset to disk and then shut down the server.- Parameters:
save
-true
force save operation.
-
shutdown
void shutdown(ShutdownArgs args)
Synchronously save the dataset to disk and then shutdown the server.- Parameters:
args
-- Since:
- 6.2
-
slaveof
@Deprecated RedisFuture<String> slaveof(String host, int port)
Deprecated.since 6.1.7, usereplicaof(String, int)
instead.Make the server a replica of another instance.- Parameters:
host
- the host type: string.port
- the port type: string.- Returns:
- String simple-string-reply.
-
slaveofNoOne
@Deprecated RedisFuture<String> slaveofNoOne()
Deprecated.since 6.1.7, usereplicaofNoOne()
instead.Promote server as master.- Returns:
- String simple-string-reply.
-
slowlogGet
RedisFuture<List<Object>> slowlogGet()
Read the slow log.- Returns:
- List<Object> deeply nested multi bulk replies.
-
slowlogGet
RedisFuture<List<Object>> slowlogGet(int count)
Read the slow log.- Parameters:
count
- the count.- Returns:
- List<Object> deeply nested multi bulk replies.
-
slowlogLen
RedisFuture<Long> slowlogLen()
Obtaining the current length of the slow log.- Returns:
- Long length of the slow log.
-
slowlogReset
RedisFuture<String> slowlogReset()
Resetting the slow log.- Returns:
- String simple-string-reply The commands returns OK on success.
-
time
RedisFuture<List<V>> time()
Return the current server time.- Returns:
- List<V> array-reply specifically: A multi bulk reply containing two elements: unix time in seconds. microseconds.
-
-