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

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

Introduction

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

Prototype

ClusterConnectionProvider(RedisClusterClient client, RedisCodec<?, ?> codec) 

Source Link

Document

Create new ClusterConnectionProvider .

Usage

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

/**
 * Creates new {@link LettuceClusterConnection} using {@link RedisClusterClient} with default
 * {@link RedisURI#DEFAULT_TIMEOUT_DURATION timeout} and a fresh {@link ClusterCommandExecutor} that gets destroyed on
 * close.//w  w w.j a v  a 2  s  . c  o  m
 *
 * @param clusterClient must not be {@literal null}.
 */
public LettuceClusterConnection(RedisClusterClient clusterClient) {
    this(new ClusterConnectionProvider(clusterClient, CODEC));
}

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

/**
 * Creates new {@link LettuceClusterConnection} with given command {@code timeout} using {@link RedisClusterClient}
 * running commands across the cluster via given {@link ClusterCommandExecutor}.
 *
 * @param clusterClient must not be {@literal null}.
 * @param timeout must not be {@literal null}.
 * @param executor must not be {@literal null}.
 * @since 2.0/*from w  w w .  j a  v  a  2  s .co  m*/
 */
public LettuceClusterConnection(RedisClusterClient clusterClient, ClusterCommandExecutor executor,
        Duration timeout) {
    this(new ClusterConnectionProvider(clusterClient, CODEC), executor, timeout);
}