Example usage for org.springframework.data.redis.connection RedisClusterNode isMaster

List of usage examples for org.springframework.data.redis.connection RedisClusterNode isMaster

Introduction

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

Prototype

public boolean isMaster() 

Source Link

Usage

From source file:org.springframework.data.redis.connection.jedis.JedisClusterConnection.java

@Override
public RedisClusterNode clusterGetNodeForSlot(int slot) {

    for (RedisClusterNode node : topologyProvider.getTopology().getSlotServingNodes(slot)) {
        if (node.isMaster()) {
            return node;
        }/* w  w  w.jav a  2 s . c  o  m*/
    }

    return null;
}