Class RedisServer

java.lang.Object
org.springframework.data.redis.connection.RedisNode
org.springframework.data.redis.connection.RedisServer
All Implemented Interfaces:
NamedNode

public class RedisServer extends RedisNode
Since:
1.4
Author:
Christoph Strobl, Thomas Darimont, Franjo Zilic
  • Constructor Details

    • RedisServer

      public RedisServer(String host, int port)
      Creates a new RedisServer with the given host, port.
      Parameters:
      host - must not be null
      port -
    • RedisServer

      public RedisServer(String host, int port, Properties properties)
      Creates a new RedisServer with the given host, port and properties.
      Parameters:
      host - must not be null
      port -
      properties - may be null
  • Method Details

    • newServerFrom

      public static RedisServer newServerFrom(Properties properties)
      Creates a new RedisServer from the given properties.
      Parameters:
      properties -
      Returns:
    • setQuorum

      public void setQuorum(Long quorum)
    • getRunId

      public String getRunId()
    • getFlags

      public String getFlags()
    • isMaster

      public boolean isMaster()
      Overrides:
      isMaster in class RedisNode
      Returns:
    • getPendingCommands

      public Long getPendingCommands()
    • getLastPingSent

      public Long getLastPingSent()
    • getLastOkPingReply

      public Long getLastOkPingReply()
    • getDownAfterMilliseconds

      public Long getDownAfterMilliseconds()
    • getInfoRefresh

      public Long getInfoRefresh()
    • getRoleReported

      public String getRoleReported()
    • roleReportedTime

      public Long roleReportedTime()
    • getConfigEpoch

      public Long getConfigEpoch()
    • getNumberReplicas

      public Long getNumberReplicas()
      Get the number of connected replicas.
      Returns:
      Since:
      2.1
    • getNumberOtherSentinels

      public Long getNumberOtherSentinels()
    • getQuorum

      public Long getQuorum()
    • getFailoverTimeout

      public Long getFailoverTimeout()
    • getParallelSyncs

      public Long getParallelSyncs()
    • get

      public String get(RedisServer.INFO info)
      Parameters:
      info - must not be null
      Returns:
      null if no entry found for requested RedisServer.INFO.
    • get

      public String get(String key)
      Parameters:
      key - must not be null or empty.
      Returns:
      null if no entry found for requested key.