Interface ReactiveServerCommands

All Known Subinterfaces:
ReactiveClusterServerCommands

public interface ReactiveServerCommands
Redis Server commands executed using reactive infrastructure.
Since:
2.0
Author:
Mark Paluch, Christoph Strobl
  • Method Summary

    Modifier and Type
    Method
    Description
    reactor.core.publisher.Mono<String>
    Start an Append Only File rewrite process on server.
    reactor.core.publisher.Mono<String>
    Start background saving of db on server.
    reactor.core.publisher.Mono<Long>
    Get the total number of available keys in currently selected database.
    reactor.core.publisher.Mono<String>
    Delete all all keys from all databases.
    reactor.core.publisher.Mono<String>
    Delete all keys of the currently selected database.
    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>
    getConfig(String pattern)
    Load configuration parameters for given pattern from server.
    reactor.core.publisher.Mono<Properties>
    Load default server information like memory cpu utilization replication
    reactor.core.publisher.Mono<Properties>
    info(String section)
    Load server information for given selection.
    reactor.core.publisher.Mono<String>
    killClient(String host, int port)
    Closes a given client connection identified by host:port.
    reactor.core.publisher.Mono<Long>
    Get time unix timestamp of last successful bgSave() operation in seconds.
    reactor.core.publisher.Mono<String>
    Reset statistic counters on server.
    reactor.core.publisher.Mono<String>
    Synchronous save current db snapshot on server.
    reactor.core.publisher.Mono<String>
    Assign given name to current connection.
    reactor.core.publisher.Mono<String>
    setConfig(String param, String value)
    Set server configuration for param to value.
    default reactor.core.publisher.Mono<Long>
    Request server timestamp using TIME command in TimeUnit.MILLISECONDS.
    reactor.core.publisher.Mono<Long>
    time(TimeUnit timeUnit)
    Request server timestamp using TIME 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 via lastSave().
      See Also:
    • lastSave

      reactor.core.publisher.Mono<Long> lastSave()
      Get time unix timestamp of last successful bgSave() 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:
    • flushAll

      reactor.core.publisher.Mono<String> flushAll()
      Delete all all keys from all databases.
      Returns:
      Mono indicating command completion.
      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

      reactor.core.publisher.Mono<Properties> info(String section)
      Load server information for given selection.
      Parameters:
      section - must not be null nor empty.
      Returns:
      Mono wrapping server information of given section.
      Throws:
      IllegalArgumentException - when section is null or empty.
      See Also:
    • getConfig

      reactor.core.publisher.Mono<Properties> getConfig(String pattern)
      Load configuration parameters for given pattern from server.
      Parameters:
      pattern - must not be null.
      Returns:
      Mono wrapping configuration parameters matching given pattern.
      Throws:
      IllegalArgumentException - when pattern is null or empty.
      See Also:
    • setConfig

      reactor.core.publisher.Mono<String> setConfig(String param, String value)
      Set server configuration for param to value.
      Parameters:
      param - must not be null nor empty.
      value - must not be null nor empty.
      Throws:
      IllegalArgumentException - when pattern / value is null or empty.
      See Also:
    • resetConfigStats

      reactor.core.publisher.Mono<String> resetConfigStats()
      Reset statistic counters on server.
      Counters can be retrieved using info().
      Returns:
      Mono indicating command completion.
      See Also:
    • time

      default reactor.core.publisher.Mono<Long> time()
      Request server timestamp using TIME command in TimeUnit.MILLISECONDS.
      Returns:
      Mono wrapping current server time in milliseconds.
      See Also:
    • time

      reactor.core.publisher.Mono<Long> time(TimeUnit timeUnit)
      Request server timestamp using TIME command.
      Parameters:
      timeUnit - target unit.
      Returns:
      Mono wrapping current server time in TimeUnit.
      Since:
      2.5
      See Also:
    • killClient

      reactor.core.publisher.Mono<String> killClient(String host, int port)
      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 wrapping String representation of the command result.
      Throws:
      IllegalArgumentException - if host is null or empty.
      See Also:
    • setClientName

      reactor.core.publisher.Mono<String> setClientName(String name)
      Assign given name to current connection.
      Parameters:
      name - must not be null nor empty.
      Throws:
      IllegalArgumentException - when name 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 emitting RedisClientInfo objects.
      See Also: