Class RedisServer
java.lang.Object
org.springframework.data.redis.connection.RedisNode
org.springframework.data.redis.connection.RedisServer
- All Implemented Interfaces:
NamedNode
- Since:
- 1.4
- Author:
- Christoph Strobl, Thomas Darimont, Franjo Zilic
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.data.redis.connection.RedisNode
RedisNode.NodeType, RedisNode.RedisNodeBuilder
-
Constructor Summary
ConstructorDescriptionRedisServer
(String host, int port) RedisServer
(String host, int port, Properties properties) -
Method Summary
Modifier and TypeMethodDescriptionget
(RedisServer.INFO info) getFlags()
Get the number of connected replicas.getRunId()
boolean
isMaster()
static RedisServer
newServerFrom
(Properties properties) Creates a newRedisServer
from the given properties.void
Methods inherited from class org.springframework.data.redis.connection.RedisNode
asString, equals, fromString, getHost, getId, getMasterId, getName, getPort, getType, hashCode, hasValidHost, isReplica, newRedisNode, setId, setName, toString
-
Constructor Details
-
RedisServer
- Parameters:
host
- must not be nullport
-
-
RedisServer
- Parameters:
host
- must not be nullport
-properties
- may be null
-
-
Method Details
-
newServerFrom
Creates a newRedisServer
from the given properties.- Parameters:
properties
-- Returns:
-
setQuorum
-
getRunId
-
getFlags
-
isMaster
public boolean isMaster() -
getPendingCommands
-
getLastPingSent
-
getLastOkPingReply
-
getDownAfterMilliseconds
-
getInfoRefresh
-
getRoleReported
-
roleReportedTime
-
getConfigEpoch
-
getNumberReplicas
Get the number of connected replicas.- Returns:
- Since:
- 2.1
-
getNumberOtherSentinels
-
getQuorum
-
getFailoverTimeout
-
getParallelSyncs
-
get
- Parameters:
info
- must not be null- Returns:
- null if no entry found for requested
RedisServer.INFO
.
-
get
- Parameters:
key
- must not be null or empty.- Returns:
- null if no entry found for requested
key
.
-