Package io.lettuce.core.masterreplica
Interface StatefulRedisMasterReplicaConnection<K,V>
-
- Type Parameters:
K
- Key type.V
- Value type.
- All Superinterfaces:
AsyncCloseable
,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 settingReadFrom
.- Since:
- 4.1
- Author:
- Mark Paluch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ReadFrom
getReadFrom()
Gets theReadFrom
setting for this connection.void
setReadFrom(ReadFrom readFrom)
Set from which nodes data is read.-
Methods inherited from interface io.lettuce.core.api.StatefulConnection
addListener, close, closeAsync, dispatch, dispatch, flushCommands, getOptions, getResources, getTimeout, isOpen, removeListener, reset, setAutoFlushCommands, setTimeout
-
Methods inherited from interface io.lettuce.core.api.StatefulRedisConnection
addListener, async, isMulti, reactive, removeListener, sync
-
-
-
-
Method Detail
-
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 forReadFrom
for more information.- Parameters:
readFrom
- the read from setting, must not benull
-
getReadFrom
ReadFrom getReadFrom()
Gets theReadFrom
setting for this connection. Defaults toReadFrom.UPSTREAM
if not set.- Returns:
- the read from setting
-
-