Example usage for org.springframework.data.redis.connection RedisSentinelConfiguration getMaster

List of usage examples for org.springframework.data.redis.connection RedisSentinelConfiguration getMaster

Introduction

In this page you can find the example usage for org.springframework.data.redis.connection RedisSentinelConfiguration getMaster.

Prototype

public NamedNode getMaster() 

Source Link

Usage

From source file:org.solq.dht.db.redis.service.JedisConnectionFactory.java

/**
 * Creates {@link JedisSentinelPool}.//w  w  w. j  av a2  s .  c o  m
 * 
 * @param config
 * @return
 * @since 1.4
 */
protected Pool<Jedis> createRedisSentinelPool(RedisSentinelConfiguration config) {
    return new JedisSentinelPool(config.getMaster().getName(), convertToJedisSentinelSet(config.getSentinels()),
            getPoolConfig() != null ? getPoolConfig() : new JedisPoolConfig(), getTimeoutFrom(getShardInfo()),
            getShardInfo().getPassword());
}