Module lettuce.core

Interface StatefulRedisMasterReplicaConnection<K,​V>

Type Parameters:
K - Key type.
V - Value type.
All Superinterfaces:
AsyncCloseable, AutoCloseable, StatefulConnection<K,​V>, StatefulRedisConnection<K,​V>
All Known Subinterfaces:
StatefulRedisMasterSlaveConnection<K,​V>

public interface StatefulRedisMasterReplicaConnection<K,​V>
extends StatefulRedisConnection<K,​V>
Redis Master-Replica connection. The connection allows replica reads by setting ReadFrom.
Since:
4.1
Author:
Mark Paluch
  • Method Details

    • setReadFrom

      void setReadFrom​(ReadFrom readFrom)
      Set from which nodes data is read. The setting is used as default for read operations on this connection. See the documentation for ReadFrom for more information.
      Parameters:
      readFrom - the read from setting, must not be null
    • getReadFrom

      ReadFrom getReadFrom()
      Gets the ReadFrom setting for this connection. Defaults to ReadFrom.UPSTREAM if not set.
      Returns:
      the read from setting