Package io.lettuce.core.cluster.topology
Interface NodeConnectionFactory
-
public interface NodeConnectionFactory
Factory interface to obtainconnections
to Redis cluster nodes.- Since:
- 4.2
- Author:
- Mark Paluch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <K,V>
StatefulRedisConnection<K,V>connectToNode(RedisCodec<K,V> codec, SocketAddress socketAddress)
Connects to aSocketAddress
with the givenRedisCodec
.<K,V>
ConnectionFuture<StatefulRedisConnection<K,V>>connectToNodeAsync(RedisCodec<K,V> codec, SocketAddress socketAddress)
Connects to aSocketAddress
with the givenRedisCodec
asynchronously.
-
-
-
Method Detail
-
connectToNode
<K,V> StatefulRedisConnection<K,V> connectToNode(RedisCodec<K,V> codec, SocketAddress socketAddress)
Connects to aSocketAddress
with the givenRedisCodec
.- Type Parameters:
K
- Key type.V
- Value type.- Parameters:
codec
- must not benull
.socketAddress
- must not benull
.- Returns:
- a new
StatefulRedisConnection
-
connectToNodeAsync
<K,V> ConnectionFuture<StatefulRedisConnection<K,V>> connectToNodeAsync(RedisCodec<K,V> codec, SocketAddress socketAddress)
Connects to aSocketAddress
with the givenRedisCodec
asynchronously.- Type Parameters:
K
- Key type.V
- Value type.- Parameters:
codec
- must not benull
.socketAddress
- must not benull
.- Returns:
- a new
StatefulRedisConnection
- Since:
- 4.4
-
-