Module lettuce.core
Package io.lettuce.core.masterreplica
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 Summary
Modifier and Type Method Description ReadFromgetReadFrom()Gets theReadFromsetting for this connection.voidsetReadFrom(ReadFrom readFrom)Set from which nodes data is read.Methods inherited from interface io.lettuce.core.api.StatefulConnection
close, closeAsync, dispatch, dispatch, flushCommands, getOptions, getResources, getTimeout, isOpen, reset, setAutoFlushCommands, setTimeoutMethods inherited from interface io.lettuce.core.api.StatefulRedisConnection
addListener, async, isMulti, reactive, removeListener, sync
-
Method Details
-
setReadFrom
Set from which nodes data is read. The setting is used as default for read operations on this connection. See the documentation forReadFromfor more information.- Parameters:
readFrom- the read from setting, must not benull
-
getReadFrom
ReadFrom getReadFrom()Gets theReadFromsetting for this connection. Defaults toReadFrom.UPSTREAMif not set.- Returns:
- the read from setting
-