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

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

Introduction

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

Prototype

@Nullable
public Integer getPort() 

Source Link

Usage

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

@Override
public void clusterMeet(RedisClusterNode node) {

    Assert.notNull(node, "Cluster node must not be null for CLUSTER MEET command!");
    Assert.hasText(node.getHost(), "Node to meet cluster must have a host!");
    Assert.isTrue(node.getPort() > 0, "Node to meet cluster must have a port greater 0!");

    clusterCommandExecutor.executeCommandOnAllNodes(
            (JedisClusterCommandCallback<String>) client -> client.clusterMeet(node.getHost(), node.getPort()));
}

From source file:org.springframework.data.redis.connection.lettuce.LettuceClusterConnection.java

@Override
public void clusterMeet(RedisClusterNode node) {

    Assert.notNull(node, "Cluster node must not be null for CLUSTER MEET command!");
    Assert.hasText(node.getHost(), "Node to meet cluster must have a host!");
    Assert.isTrue(node.getPort() > 0, "Node to meet cluster must have a port greater 0!");

    this.clusterCommandExecutor
            .executeCommandOnAllNodes((LettuceClusterCommandCallback<String>) client -> client
                    .clusterMeet(node.getHost(), node.getPort()));
}