Class RedisNode
java.lang.Object
org.springframework.data.redis.connection.RedisNode
- All Implemented Interfaces:
- NamedNode
- Direct Known Subclasses:
- RedisClusterNode,- RedisServer
- Since:
- 1.4
- Author:
- Christoph Strobl, Thomas Darimont, Mark Paluch
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionasString()booleanstatic RedisNodefromString(String hostPortString) Parse ahostAndPortstring intoRedisNode.getHost()getId()getName()getPort()getType()inthashCode()booleanbooleanisMaster()booleanstatic RedisNode.RedisNodeBuilderGetRedisNode.RedisNodeBuilderfor creating newRedisNode.voidvoidtoString()
- 
Constructor Details- 
RedisNode- Parameters:
- host- must not be null
- port-
 
- 
RedisNodeprotected RedisNode()
 
- 
- 
Method Details- 
fromStringParse ahostAndPortstring intoRedisNode. Supports IPv4, IPv6, and hostname notations including the port. For example:RedisNode.fromString("127.0.0.1:6379"); RedisNode.fromString("[aaaa:bbbb::dddd:eeee]:6379"); RedisNode.fromString("my.redis.server:6379");- Parameters:
- hostPortString- must not be null or empty.
- Returns:
- the parsed RedisNode.
- Since:
- 2.7.4
 
- 
getHost- Returns:
- can be null.
 
- 
hasValidHostpublic boolean hasValidHost()- Returns:
- whether this node has a valid host (not null and not empty).
- Since:
- 2.3.8
 
- 
getPort- Returns:
- can be null.
 
- 
asString
- 
getName
- 
setName
- 
getMasterId- Returns:
- can be null.
- Since:
- 1.7
 
- 
getId- Returns:
- can be null.
- Since:
- 1.7
 
- 
setId- Parameters:
- id-
- Since:
- 1.7
 
- 
getType- Returns:
- can be null.
- Since:
- 1.7
 
- 
isMasterpublic boolean isMaster()- Returns:
- Since:
- 1.7
 
- 
isReplicapublic boolean isReplica()- Returns:
- Since:
- 2.1
 
- 
newRedisNodeGetRedisNode.RedisNodeBuilderfor creating newRedisNode.- Returns:
- never null.
- Since:
- 1.7
 
- 
toString
- 
hashCodepublic int hashCode()
- 
equals
 
-