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 givenpatternfrom 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 forparamtovalue.default reactor.core.publisher.Mono<Long>time()Request server timestamp usingTIMEcommand inTimeUnit.MILLISECONDS.reactor.core.publisher.Mono<Long>Request server timestamp usingTIMEcommand.
-
Method Details
-
bgReWriteAof
reactor.core.publisher.Mono<String> bgReWriteAof()Start an Append Only File rewrite process on server.- Returns:
Monoindicating command completion.- See Also:
-
bgSave
reactor.core.publisher.Mono<String> bgSave()Start background saving of db on server.- Returns:
Monoindicating 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:
Monowrapping unix timestamp.- See Also:
-
save
reactor.core.publisher.Mono<String> save()Synchronous save current db snapshot on server.- Returns:
Monoindicating command completion.- See Also:
-
dbSize
reactor.core.publisher.Mono<Long> dbSize()Get the total number of available keys in currently selected database.- Returns:
Monowrapping number of keys.- See Also:
-
flushDb
reactor.core.publisher.Mono<String> flushDb()Delete all keys of the currently selected database.- Returns:
Monoindicating command completion.- See Also:
-
flushDb
Delete all keys of the currently selected database using the specifiedRedisServerCommands.FlushOption.- Parameters:
option-- Returns:
Monoindicating command completion.- Since:
- 2.7
- See Also:
-
flushAll
reactor.core.publisher.Mono<String> flushAll()Delete all all keys from all databases.- Returns:
Monoindicating command completion.- See Also:
-
flushAll
Delete all all keys from all databases using the specifiedRedisServerCommands.FlushOption.- Parameters:
option-- Returns:
Monoindicating command completion.- Since:
- 2.7
- See Also:
-
info
reactor.core.publisher.Mono<Properties> info()Load default server information like- memory
- cpu utilization
- replication
- Returns:
Monowrapping server information.- See Also:
-
info
Load server information for givenselection.- Parameters:
section- must not be null nor empty.- Returns:
Monowrapping server information of givensection.- Throws:
IllegalArgumentException- when section is null or empty.- See Also:
-
getConfig
Load configuration parameters for givenpatternfrom server.- Parameters:
pattern- must not be null.- Returns:
Monowrapping configuration parameters matching givenpattern.- Throws:
IllegalArgumentException- whenpatternis null or empty.- See Also:
-
setConfig
Set server configuration forparamtovalue.- Parameters:
param- must not be null nor empty.value- must not be null nor empty.- Throws:
IllegalArgumentException- whenpattern/valueis null or empty.- See Also:
-
resetConfigStats
reactor.core.publisher.Mono<String> resetConfigStats()Reset statistic counters on server.
Counters can be retrieved usinginfo().- Returns:
Monoindicating command completion.- See Also:
-
time
Request server timestamp usingTIMEcommand inTimeUnit.MILLISECONDS.- Returns:
Monowrapping current server time in milliseconds.- See Also:
-
time
Request server timestamp usingTIMEcommand.- Parameters:
timeUnit- target unit.- Returns:
Monowrapping 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:
MonowrappingStringrepresentation of the command result.- Throws:
IllegalArgumentException- ifhostis null or empty.- See Also:
-
setClientName
Assign given name to current connection.- Parameters:
name- must not be null nor empty.- Throws:
IllegalArgumentException- whennameis null or empty.- See Also:
-
getClientName
reactor.core.publisher.Mono<String> getClientName()Returns the name of the current connection.- Returns:
Monowrapping the connection name.- See Also:
-
getClientList
reactor.core.publisher.Flux<RedisClientInfo> getClientList()Request information and statistics about connected clients.- Returns:
FluxemittingRedisClientInfoobjects.- See Also:
-