Class 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 one StatefulRedisModulesConnectionImpl A ConnectionWatchdog monitors each connection and reconnects automatically until RedisChannelHandler.close() is called. All pending commands will be (re)sent after successful reconnection.
    Author:
    Mark Paluch, Julien Ruaux
    • Field Summary

      • Fields inherited from class io.lettuce.core.StatefulRedisConnectionImpl

        async, codec, multi, reactive, sync
    • 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.
    • 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

      • newRedisReactiveCommandsImpl

        protected io.lettuce.core.RedisReactiveCommandsImpl<K,​V> newRedisReactiveCommandsImpl()
        Create a new instance of RedisModulesReactiveCommandsImpl. Can be overriden to extend.
        Overrides:
        newRedisReactiveCommandsImpl in class io.lettuce.core.StatefulRedisConnectionImpl<K,​V>
      • newRedisSyncCommandsImpl

        protected RedisModulesCommands<K,​V> newRedisSyncCommandsImpl()
        Create a new instance of RedisModulesCommands. Can be overriden to extend.
        Overrides:
        newRedisSyncCommandsImpl in class io.lettuce.core.StatefulRedisConnectionImpl<K,​V>
        Returns:
        a new instance