Class RedisNode.RedisNodeBuilder
java.lang.Object
org.springframework.data.redis.connection.RedisNode.RedisNodeBuilder
- Direct Known Subclasses:
RedisClusterNode.RedisClusterNodeBuilder
- Enclosing class:
- RedisNode
Builder for creating new
RedisNode
.- Since:
- 1.4
- Author:
- Christoph Strobl
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Get theRedisNode
.listeningAt
(String host, int port) Set host and port of server.promotedAs
(RedisNode.NodeType type) Set server role.Set the id of the master node.Set id of server.Define node name.
-
Constructor Details
-
RedisNodeBuilder
public RedisNodeBuilder()
-
-
Method Details
-
withName
Define node name. -
listeningAt
Set host and port of server.- Parameters:
host
- must not be null.port
-- Returns:
-
withId
Set id of server.- Parameters:
id
-- Returns:
-
promotedAs
Set server role.- Parameters:
type
-- Returns:
- Since:
- 1.7
-
replicaOf
Set the id of the master node.- Parameters:
masterId
-- Returns:
- this.
- Since:
- 2.1
-
build
Get theRedisNode
.- Returns:
-