Class RedisClusterNode.RedisClusterNodeBuilder
java.lang.Object
org.springframework.data.redis.connection.RedisNode.RedisNodeBuilder
org.springframework.data.redis.connection.RedisClusterNode.RedisClusterNodeBuilder
- Enclosing class:
- RedisClusterNode
Builder for creating new
RedisClusterNode
.- Since:
- 1.7
- Author:
- Christoph Strobl
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Get theRedisNode
.linkState
(RedisClusterNode.LinkState linkState) listeningAt
(String host, int port) Set host and port of server.promotedAs
(RedisNode.NodeType nodeType) Set server role.Set the id of the master node.withFlags
(Set<RedisClusterNode.Flag> flags) Set flags for node.Set id of server.Define node name.
-
Constructor Details
-
RedisClusterNodeBuilder
public RedisClusterNodeBuilder()
-
-
Method Details
-
listeningAt
Description copied from class:RedisNode.RedisNodeBuilder
Set host and port of server.- Overrides:
listeningAt
in classRedisNode.RedisNodeBuilder
- Parameters:
host
- must not be null.- Returns:
-
withName
Description copied from class:RedisNode.RedisNodeBuilder
Define node name.- Overrides:
withName
in classRedisNode.RedisNodeBuilder
-
withId
Description copied from class:RedisNode.RedisNodeBuilder
Set id of server.- Overrides:
withId
in classRedisNode.RedisNodeBuilder
- Returns:
-
promotedAs
Description copied from class:RedisNode.RedisNodeBuilder
Set server role.- Overrides:
promotedAs
in classRedisNode.RedisNodeBuilder
- Returns:
-
replicaOf
Description copied from class:RedisNode.RedisNodeBuilder
Set the id of the master node.- Overrides:
replicaOf
in classRedisNode.RedisNodeBuilder
- Returns:
- this.
-
withFlags
Set flags for node.- Parameters:
flags
-- Returns:
-
serving
- Parameters:
range
-- Returns:
-
linkState
- Parameters:
linkState
-- Returns:
-
build
Description copied from class:RedisNode.RedisNodeBuilder
Get theRedisNode
.- Overrides:
build
in classRedisNode.RedisNodeBuilder
- Returns:
-