Interface ReactiveServerCommands
- All Known Subinterfaces:
ReactiveClusterServerCommands
public interface ReactiveServerCommands
Redis Server commands executed using reactive infrastructure.
- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl, Dennis Neufeld
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<String>
Start an Append Only File rewrite process on server.reactor.core.publisher.Mono<String>
bgSave()
Start background saving of db on server.reactor.core.publisher.Mono<Long>
dbSize()
Get the total number of available keys in currently selected database.reactor.core.publisher.Mono<String>
flushAll()
Delete all all keys from all databases.reactor.core.publisher.Mono<String>
Delete all all keys from all databases using the specifiedRedisServerCommands.FlushOption
.reactor.core.publisher.Mono<String>
flushDb()
Delete all keys of the currently selected database.reactor.core.publisher.Mono<String>
Delete all keys of the currently selected database using the specifiedRedisServerCommands.FlushOption
.reactor.core.publisher.Flux<RedisClientInfo>
Request information and statistics about connected clients.reactor.core.publisher.Mono<String>
Returns the name of the current connection.reactor.core.publisher.Mono<Properties>
Load configuration parameters for givenpattern
from server.reactor.core.publisher.Mono<Properties>
info()
Load default server information like memory cpu utilization replicationreactor.core.publisher.Mono<Properties>
Load server information for givenselection
.reactor.core.publisher.Mono<String>
killClient
(String host, int port) Closes a given client connection identified by host:port.reactor.core.publisher.Mono<Long>
lastSave()
Get time unix timestamp of last successfulbgSave()
operation in seconds.reactor.core.publisher.Mono<String>
Reset statistic counters on server.reactor.core.publisher.Mono<String>
save()
Synchronous save current db snapshot on server.reactor.core.publisher.Mono<String>
setClientName
(String name) Assign given name to current connection.reactor.core.publisher.Mono<String>
Set server configuration forparam
tovalue
.default reactor.core.publisher.Mono<Long>
time()
Request server timestamp usingTIME
command inTimeUnit.MILLISECONDS
.reactor.core.publisher.Mono<Long>
Request server timestamp usingTIME
command.
-
Method Details
-
bgReWriteAof
reactor.core.publisher.Mono<String> bgReWriteAof()Start an Append Only File rewrite process on server.- Returns:
Mono
indicating command completion.- See Also:
-
bgSave
reactor.core.publisher.Mono<String> bgSave()Start background saving of db on server.- Returns:
Mono
indicating command received by server. Operation success needs to be checked vialastSave()
.- See Also:
-
lastSave
reactor.core.publisher.Mono<Long> lastSave()Get time unix timestamp of last successfulbgSave()
operation in seconds.- Returns:
Mono
wrapping unix timestamp.- See Also:
-
save
reactor.core.publisher.Mono<String> save()Synchronous save current db snapshot on server.- Returns:
Mono
indicating command completion.- See Also:
-
dbSize
reactor.core.publisher.Mono<Long> dbSize()Get the total number of available keys in currently selected database.- Returns:
Mono
wrapping number of keys.- See Also:
-
flushDb
reactor.core.publisher.Mono<String> flushDb()Delete all keys of the currently selected database.- Returns:
Mono
indicating command completion.- See Also:
-
flushDb
Delete all keys of the currently selected database using the specifiedRedisServerCommands.FlushOption
.- Parameters:
option
-- Returns:
Mono
indicating command completion.- Since:
- 2.7
- See Also:
-
flushAll
reactor.core.publisher.Mono<String> flushAll()Delete all all keys from all databases.- Returns:
Mono
indicating command completion.- See Also:
-
flushAll
Delete all all keys from all databases using the specifiedRedisServerCommands.FlushOption
.- Parameters:
option
-- Returns:
Mono
indicating command completion.- Since:
- 2.7
- See Also:
-
info
reactor.core.publisher.Mono<Properties> info()Load default server information like- memory
- cpu utilization
- replication
- Returns:
Mono
wrapping server information.- See Also:
-
info
Load server information for givenselection
.- Parameters:
section
- must not be null nor empty.- Returns:
Mono
wrapping server information of givensection
.- Throws:
IllegalArgumentException
- when section is null or empty.- See Also:
-
getConfig
Load configuration parameters for givenpattern
from server.- Parameters:
pattern
- must not be null.- Returns:
Mono
wrapping configuration parameters matching givenpattern
.- Throws:
IllegalArgumentException
- whenpattern
is null or empty.- See Also:
-
setConfig
Set server configuration forparam
tovalue
.- Parameters:
param
- must not be null nor empty.value
- must not be null nor empty.- Throws:
IllegalArgumentException
- whenpattern
/value
is null or empty.- See Also:
-
resetConfigStats
reactor.core.publisher.Mono<String> resetConfigStats()Reset statistic counters on server.
Counters can be retrieved usinginfo()
.- Returns:
Mono
indicating command completion.- See Also:
-
time
Request server timestamp usingTIME
command inTimeUnit.MILLISECONDS
.- Returns:
Mono
wrapping current server time in milliseconds.- See Also:
-
time
Request server timestamp usingTIME
command.- Parameters:
timeUnit
- target unit.- Returns:
Mono
wrapping current server time inTimeUnit
.- Since:
- 2.5
- See Also:
-
killClient
Closes a given client connection identified by host:port.- Parameters:
host
- of connection to close. Must not be null nor empty.port
- of connection to close- Returns:
Mono
wrappingString
representation of the command result.- Throws:
IllegalArgumentException
- ifhost
is null or empty.- See Also:
-
setClientName
Assign given name to current connection.- Parameters:
name
- must not be null nor empty.- Throws:
IllegalArgumentException
- whenname
is null or empty.- See Also:
-
getClientName
reactor.core.publisher.Mono<String> getClientName()Returns the name of the current connection.- Returns:
Mono
wrapping the connection name.- See Also:
-
getClientList
reactor.core.publisher.Flux<RedisClientInfo> getClientList()Request information and statistics about connected clients.- Returns:
Flux
emittingRedisClientInfo
objects.- See Also:
-