Example usage for org.springframework.data.redis.connection.jedis JedisClusterConnection JedisClusterConnection

List of usage examples for org.springframework.data.redis.connection.jedis JedisClusterConnection JedisClusterConnection

Introduction

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

Prototype

public JedisClusterConnection(JedisCluster cluster, ClusterCommandExecutor executor) 

Source Link

Document

Create new JedisClusterConnection utilizing native connections via JedisCluster running commands across the cluster via given ClusterCommandExecutor .

Usage

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

@Override
public RedisClusterConnection getClusterConnection() {

    if (cluster == null) {
        throw new InvalidDataAccessApiUsageException("Cluster is not configured!");
    }/*from  w  w w.j a  va 2  s  .  c o m*/
    return new JedisClusterConnection(cluster, clusterCommandExecutor);
}