public class MasterSlaveTopologyProvider extends Object implements TopologyProvider
INFO REPLICATION
output. Slaves are listed as slaveN=...
entries.Modifier and Type | Field and Description |
---|---|
static Pattern |
IP_PATTERN |
static Pattern |
MASTER_HOST_PATTERN |
static Pattern |
MASTER_PORT_PATTERN |
static Pattern |
PORT_PATTERN |
static Pattern |
ROLE_PATTERN |
static Pattern |
SLAVE_PATTERN |
Constructor and Description |
---|
MasterSlaveTopologyProvider(StatefulRedisConnection<?,?> connection,
RedisURI redisURI)
Creates a new
MasterSlaveTopologyProvider . |
Modifier and Type | Method and Description |
---|---|
List<RedisNodeDescription> |
getNodes()
Lookup nodes within the topology.
|
CompletableFuture<List<RedisNodeDescription>> |
getNodesAsync()
Lookup nodes asynchronously within the topology.
|
protected List<RedisNodeDescription> |
getNodesFromInfo(String info) |
public static final Pattern ROLE_PATTERN
public static final Pattern SLAVE_PATTERN
public static final Pattern MASTER_HOST_PATTERN
public static final Pattern MASTER_PORT_PATTERN
public static final Pattern IP_PATTERN
public static final Pattern PORT_PATTERN
public MasterSlaveTopologyProvider(StatefulRedisConnection<?,?> connection, RedisURI redisURI)
MasterSlaveTopologyProvider
.connection
- must not be nullredisURI
- must not be nullpublic List<RedisNodeDescription> getNodes()
TopologyProvider
getNodes
in interface TopologyProvider
RedisNodeDescription
instancespublic CompletableFuture<List<RedisNodeDescription>> getNodesAsync()
TopologyProvider
getNodesAsync
in interface TopologyProvider
RedisNodeDescription
instancesprotected List<RedisNodeDescription> getNodesFromInfo(String info)
Copyright © 2019 lettuce.io. All rights reserved.