Package com.redis.lettucemod
Class StatefulRedisModulesConnectionImpl<K,V>
- java.lang.Object
-
- io.lettuce.core.RedisChannelHandler<K,V>
-
- io.lettuce.core.StatefulRedisConnectionImpl<K,V>
-
- com.redis.lettucemod.StatefulRedisModulesConnectionImpl<K,V>
-
- Type Parameters:
K- Key type.V- Value type.
- All Implemented Interfaces:
StatefulRedisModulesConnection<K,V>,io.lettuce.core.api.AsyncCloseable,io.lettuce.core.api.StatefulConnection<K,V>,io.lettuce.core.api.StatefulRedisConnection<K,V>,io.lettuce.core.internal.AsyncCloseable,io.lettuce.core.protocol.ConnectionFacade,java.io.Closeable,java.lang.AutoCloseable
public class StatefulRedisModulesConnectionImpl<K,V> extends io.lettuce.core.StatefulRedisConnectionImpl<K,V> implements StatefulRedisModulesConnection<K,V>
A thread-safe connection to a RedisTimeSeries server. Multiple threads may share oneStatefulRedisModulesConnectionImplAConnectionWatchdogmonitors each connection and reconnects automatically untilRedisChannelHandler.close()is called. All pending commands will be (re)sent after successful reconnection.- Author:
- Mark Paluch, Julien Ruaux
-
-
Constructor Summary
Constructors Constructor Description StatefulRedisModulesConnectionImpl(io.lettuce.core.RedisChannelWriter writer, io.lettuce.core.protocol.PushHandler pushHandler, io.lettuce.core.codec.RedisCodec<K,V> codec, java.time.Duration timeout)Initialize a new connection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RedisModulesAsyncCommands<K,V>async()protected RedisModulesAsyncCommandsImpl<K,V>newRedisAsyncCommandsImpl()Create a new instance ofRedisModulesAsyncCommandsImpl.protected io.lettuce.core.RedisReactiveCommandsImpl<K,V>newRedisReactiveCommandsImpl()Create a new instance ofRedisModulesReactiveCommandsImpl.protected RedisModulesCommands<K,V>newRedisSyncCommandsImpl()Create a new instance ofRedisModulesCommands.RedisModulesReactiveCommands<K,V>reactive()RedisModulesCommands<K,V>sync()-
Methods inherited from class io.lettuce.core.StatefulRedisConnectionImpl
addListener, dispatch, dispatch, getCodec, getConnectionState, isMulti, preProcessCommand, removeListener, setClientName
-
Methods inherited from class io.lettuce.core.RedisChannelHandler
activated, addListener, addListener, close, closeAsync, deactivated, flushCommands, getChannelWriter, getConnectionEvents, getOptions, getResources, getTimeout, isClosed, isOpen, registerCloseables, removeListener, reset, setAutoFlushCommands, setOptions, setTimeout, syncHandler
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
StatefulRedisModulesConnectionImpl
public StatefulRedisModulesConnectionImpl(io.lettuce.core.RedisChannelWriter writer, io.lettuce.core.protocol.PushHandler pushHandler, io.lettuce.core.codec.RedisCodec<K,V> codec, java.time.Duration timeout)Initialize a new connection.- Parameters:
writer- the channel writer.pushHandler- the handler for push notifications.codec- Codec used to encode/decode keys and values.timeout- Maximum time to wait for a response.
-
-
Method Detail
-
newRedisAsyncCommandsImpl
protected RedisModulesAsyncCommandsImpl<K,V> newRedisAsyncCommandsImpl()
Create a new instance ofRedisModulesAsyncCommandsImpl. Can be overriden to extend.
-
newRedisReactiveCommandsImpl
protected io.lettuce.core.RedisReactiveCommandsImpl<K,V> newRedisReactiveCommandsImpl()
Create a new instance ofRedisModulesReactiveCommandsImpl. Can be overriden to extend.
-
newRedisSyncCommandsImpl
protected RedisModulesCommands<K,V> newRedisSyncCommandsImpl()
Create a new instance ofRedisModulesCommands. Can be overriden to extend.
-
async
public RedisModulesAsyncCommands<K,V> async()
-
sync
public RedisModulesCommands<K,V> sync()
-
-