Package io.lettuce.core.models.role
Class RedisSentinelInstance
- java.lang.Object
-
- io.lettuce.core.models.role.RedisSentinelInstance
-
- All Implemented Interfaces:
RedisInstance
,Serializable
public class RedisSentinelInstance extends Object implements RedisInstance, Serializable
Redis sentinel instance.- Since:
- 3.0
- Author:
- Mark Paluch
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.lettuce.core.models.role.RedisInstance
RedisInstance.Role
-
-
Constructor Summary
Constructors Constructor Description RedisSentinelInstance()
RedisSentinelInstance(List<String> monitoredMasters)
Constructs aRedisSentinelInstance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getMonitoredMasters()
RedisInstance.Role
getRole()
void
setMonitoredMasters(List<String> monitoredMasters)
String
toString()
-
-
-
Constructor Detail
-
RedisSentinelInstance
public RedisSentinelInstance()
-
RedisSentinelInstance
public RedisSentinelInstance(List<String> monitoredMasters)
Constructs aRedisSentinelInstance
- Parameters:
monitoredMasters
- list of monitored masters, must not benull
but may be empty
-
-
Method Detail
-
getRole
public RedisInstance.Role getRole()
- Specified by:
getRole
in interfaceRedisInstance
- Returns:
- always
RedisInstance.Role.SENTINEL
-
getMonitoredMasters
public List<String> getMonitoredMasters()
- Returns:
- List of monitored master names.
-
-