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 ClassesNested classes/interfaces inherited from class org.springframework.data.redis.connection.RedisNode
RedisNode.NodeType, RedisNode.RedisNodeBuilder
-
Field Summary
Fields inherited from class org.springframework.data.redis.connection.RedisNode
DEFAULT_PORT, DEFAULT_SENTINEL_PORT
-
Constructor Summary
ConstructorsConstructorDescriptionRedisServer
(String host, int port) RedisServer
(String host, int port, @Nullable Properties properties) -
Method Summary
Modifier and TypeMethodDescription@Nullable String
@Nullable String
get
(RedisServer.INFO info) @Nullable Long
@Nullable Long
@Nullable Long
@Nullable String
getFlags()
@Nullable Long
@Nullable Long
@Nullable Long
@Nullable Long
@Nullable Long
Get the number of connected replicas.@Nullable Long
@Nullable Long
@Nullable Long
@Nullable String
@Nullable String
getRunId()
boolean
isMaster()
static RedisServer
newServerFrom
(Properties properties) Creates a newRedisServer
from the given properties.@Nullable Long
void
Methods inherited from class org.springframework.data.redis.connection.RedisNode
asString, equals, fromString, fromString, getHost, getId, getMasterId, getName, getPort, getPortOr, getRequiredHost, getRequiredPort, 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
.
-