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 |
MASTER
Setting to read from the master only.
|
static ReadFrom |
MASTER_PREFERRED
Setting to read preferred from the master and fall back to a slave if the master is not available.
|
static ReadFrom |
NEAREST
Setting to read from the nearest node.
|
static ReadFrom |
SLAVE
Setting to read from the slave only.
|
static ReadFrom |
SLAVE_PREFERRED
Setting to read preferred from slaves and fall back to master if no slave is not available.
|
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 SLAVE_PREFERRED
public static final ReadFrom SLAVE
public static final ReadFrom NEAREST
public abstract List<RedisNodeDescription> select(ReadFrom.Nodes nodes)
nodes
- set of nodes that are suitable for readingRedisNodeDescription
s that are selected for readingCopyright © 2018 lettuce.io. All rights reserved.