Class RedisConnector

java.lang.Object
com.predic8.membrane.core.util.RedisConnector
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean

public class RedisConnector extends Object implements org.springframework.beans.factory.InitializingBean
  • Constructor Details

    • RedisConnector

      public RedisConnector()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • getJedisWithDb

      public redis.clients.jedis.Jedis getJedisWithDb()
    • getPool

      public redis.clients.jedis.JedisPool getPool()
    • getConnectionNumber

      public int getConnectionNumber()
    • setConnectionNumber

      public void setConnectionNumber(int connectionNumber)
    • getMinIdleConnection

      public int getMinIdleConnection()
    • setMinIdleConnection

      public void setMinIdleConnection(int minIdleConnection)
    • getParams

      public redis.clients.jedis.params.GetExParams getParams()
    • setParams

      public void setParams(redis.clients.jedis.params.GetExParams params)
    • getTimeout

      public int getTimeout()
    • setTimeout

      public void setTimeout(int timeout)
      Description
      Timeout value when connecting to Redis instance. Default is 10000 milliseconds. Unit is in milliseconds
    • getUser

      public String getUser()
    • setUser

      public void setUser(String user)
      Description
      Username to use when connecting redis.
    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String password)
      Description
      Password to use when connecting redis.
    • isSsl

      public boolean isSsl()
    • setSsl

      public void setSsl(boolean ssl)
      Description
      Used for enabling ssl. Default value is false
    • getHost

      public String getHost()
    • setHost

      public void setHost(String host)
      Description
      Host name to connect to, or multiple host names separated by spaces ' '.
    • getPort

      public int getPort()
    • setPort

      public void setPort(int port)
      Description
      Port number to connect to
    • getDbNumber

      public int getDbNumber()
    • setDbNumber

      public void setDbNumber(int dbNumber)
      Description
      Database number to use
    • isUseSentinels

      public boolean isUseSentinels()
    • setUseSentinels

      public void setUseSentinels(boolean useSentinels)
      Whether to use Redis Sentinels to discover the master Redis node. When this is used, the host and port properties are used to specify the sentinels.
      Default
      false
    • getMasterName

      public String getMasterName()
    • setMasterName

      public void setMasterName(String masterName)
      The name of the master node to use when using Redis Sentinels.
      Default
      mymaster