Module lettuce.core

Interface RedisReactiveCommands<K,​V>

Type Parameters:
K - Key type.
V - Value type.
All Superinterfaces:
BaseRedisReactiveCommands<K,​V>, RedisAclReactiveCommands<K,​V>, RedisClusterReactiveCommands<K,​V>, RedisGeoReactiveCommands<K,​V>, RedisHashReactiveCommands<K,​V>, RedisHLLReactiveCommands<K,​V>, RedisKeyReactiveCommands<K,​V>, RedisListReactiveCommands<K,​V>, RedisScriptingReactiveCommands<K,​V>, RedisServerReactiveCommands<K,​V>, RedisSetReactiveCommands<K,​V>, RedisSortedSetReactiveCommands<K,​V>, RedisStreamReactiveCommands<K,​V>, RedisStringReactiveCommands<K,​V>, RedisTransactionalReactiveCommands<K,​V>
All Known Subinterfaces:
RedisClusterPubSubReactiveCommands<K,​V>, RedisPubSubReactiveCommands<K,​V>
All Known Implementing Classes:
RedisClusterPubSubReactiveCommandsImpl, RedisPubSubReactiveCommandsImpl, RedisReactiveCommandsImpl

public interface RedisReactiveCommands<K,​V>
extends BaseRedisReactiveCommands<K,​V>, RedisAclReactiveCommands<K,​V>, RedisClusterReactiveCommands<K,​V>, RedisGeoReactiveCommands<K,​V>, RedisHashReactiveCommands<K,​V>, RedisHLLReactiveCommands<K,​V>, RedisKeyReactiveCommands<K,​V>, RedisListReactiveCommands<K,​V>, RedisScriptingReactiveCommands<K,​V>, RedisServerReactiveCommands<K,​V>, RedisSetReactiveCommands<K,​V>, RedisSortedSetReactiveCommands<K,​V>, RedisStreamReactiveCommands<K,​V>, RedisStringReactiveCommands<K,​V>, RedisTransactionalReactiveCommands<K,​V>
A complete reactive and thread-safe Redis API with 400+ Methods.
Since:
5.0
Author:
Mark Paluch
  • Method Details

    • auth

      Mono<String> auth​(CharSequence password)
      Authenticate to the server.
      Specified by:
      auth in interface RedisClusterReactiveCommands<K,​V>
      Parameters:
      password - the password
      Returns:
      String simple-string-reply
    • auth

      Mono<String> auth​(String username, CharSequence password)
      Authenticate to the server with username and password. Requires Redis 6 or newer.
      Specified by:
      auth in interface RedisClusterReactiveCommands<K,​V>
      Parameters:
      username - the username
      password - the password
      Returns:
      String simple-string-reply
      Since:
      6.0
    • select

      Mono<String> select​(int db)
      Change the selected database for the current connection.
      Parameters:
      db - the database number
      Returns:
      String simple-string-reply
    • swapdb

      Mono<String> swapdb​(int db1, int db2)
      Swap two Redis databases, so that immediately all the clients connected to a given DB will see the data of the other DB, and the other way around
      Parameters:
      db1 - the first database number
      db2 - the second database number
      Returns:
      String simple-string-reply
    • getStatefulConnection

      StatefulRedisConnection<K,​V> getStatefulConnection()
      Returns:
      the underlying connection.