public abstract class ReadFrom extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ReadFrom.Nodes
Descriptor of nodes that are available for the current read operation.
|
| Modifier and Type | Field and Description |
|---|---|
static ReadFrom |
ANY
Setting to read from any node.
|
static ReadFrom |
MASTER
Setting to read from the master only.
|
static ReadFrom |
MASTER_PREFERRED
Setting to read preferred from the master and fall back to a replica if the master is not available.
|
static ReadFrom |
NEAREST
Setting to read from the nearest node.
|
static ReadFrom |
REPLICA
Setting to read from the replica only.
|
static ReadFrom |
REPLICA_PREFERRED
Setting to read preferred from replica and fall back to master if no replica is not available.
|
static ReadFrom |
SLAVE
Deprecated.
renamed to
REPLICA. |
static ReadFrom |
SLAVE_PREFERRED
Deprecated.
Renamed to
REPLICA_PREFERRED. |
| Constructor and Description |
|---|
ReadFrom() |
| Modifier and Type | Method and Description |
|---|---|
abstract List<RedisNodeDescription> |
select(ReadFrom.Nodes nodes)
Chooses the nodes from the matching Redis nodes that match this read selector.
|
static ReadFrom |
valueOf(String name)
Retrieve the
ReadFrom preset by name. |
public static final ReadFrom MASTER
public static final ReadFrom MASTER_PREFERRED
public static final ReadFrom REPLICA_PREFERRED
@Deprecated public static final ReadFrom SLAVE_PREFERRED
REPLICA_PREFERRED.public static final ReadFrom REPLICA
@Deprecated public static final ReadFrom SLAVE
REPLICA.public static final ReadFrom NEAREST
public static final ReadFrom ANY
public abstract List<RedisNodeDescription> select(ReadFrom.Nodes nodes)
nodes - set of nodes that are suitable for readingRedisNodeDescriptions that are selected for readingCopyright © 2019 lettuce.io. All rights reserved.