Example usage for org.springframework.data.redis.connection.lettuce LettuceConnectionFactory isRedisSentinelAware

List of usage examples for org.springframework.data.redis.connection.lettuce LettuceConnectionFactory isRedisSentinelAware

Introduction

In this page you can find the example usage for org.springframework.data.redis.connection.lettuce LettuceConnectionFactory isRedisSentinelAware.

Prototype

public boolean isRedisSentinelAware() 

Source Link

Usage

From source file:org.springframework.boot.autoconfigure.data.redis.RedisAutoConfigurationTests.java

@Test
public void testRedisConfigurationWithSentinelAndDatabase() {
    this.contextRunner.withPropertyValues("spring.redis.database:1", "spring.redis.sentinel.master:mymaster",
            "spring.redis.sentinel.nodes:127.0.0.1:26379, 127.0.0.1:26380").run((context) -> {
                LettuceConnectionFactory connectionFactory = context.getBean(LettuceConnectionFactory.class);
                assertThat(connectionFactory.getDatabase()).isEqualTo(1);
                assertThat(connectionFactory.isRedisSentinelAware()).isTrue();
            });// w  w w. ja  v  a2  s. c o m
}