Example usage for org.springframework.data.redis.connection.lettuce LettuceClusterConnection LettuceClusterConnection

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

Introduction

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

Prototype

public LettuceClusterConnection(LettuceConnectionProvider connectionProvider, ClusterCommandExecutor executor) 

Source Link

Document

Creates new LettuceClusterConnection using LettuceConnectionProvider running commands across the cluster via given ClusterCommandExecutor .

Usage

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

@Override
public RedisClusterConnection getClusterConnection() {

    if (!isClusterAware()) {
        throw new InvalidDataAccessApiUsageException("Cluster is not configured!");
    }/*from  w  w w .j av a2s. c o m*/

    return new LettuceClusterConnection((RedisClusterClient) client, clusterCommandExecutor);
}