Package org.springframework.data.redis.connection

Examples of org.springframework.data.redis.connection.RedisSentinelConnection


   * @see DATAREDIS-330
   */
  @Test
  public void shouldReadSlavesOfMastersCorrectly() {

    RedisSentinelConnection sentinelConnection = connectionFactory.getSentinelConnection();
   
    List<RedisServer> servers = (List<RedisServer>) sentinelConnection.masters();
    assertThat(servers.size(), is(1));
   
    Collection<RedisServer> slaves = sentinelConnection.slaves(servers.get(0));
    assertThat(slaves.size(), is(2));
    assertThat(slaves, hasItems(SLAVE_0, SLAVE_1));
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.redis.connection.RedisSentinelConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.