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, Closeable, 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
  • Constructor Details

    • StatefulRedisModulesConnectionImpl

      public StatefulRedisModulesConnectionImpl(io.lettuce.core.RedisChannelWriter writer, io.lettuce.core.protocol.PushHandler pushHandler, io.lettuce.core.codec.RedisCodec<K,V> codec, 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 Details

    • newRedisAsyncCommandsImpl

      protected RedisModulesAsyncCommandsImpl<K,V> newRedisAsyncCommandsImpl()
      Create a new instance of RedisModulesAsyncCommandsImpl. Can be overriden to extend.
      Overrides:
      newRedisAsyncCommandsImpl in class io.lettuce.core.StatefulRedisConnectionImpl<K,V>
    • 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
    • async

      public RedisModulesAsyncCommands<K,V> async()
      Specified by:
      async in interface io.lettuce.core.api.StatefulRedisConnection<K,V>
      Specified by:
      async in interface StatefulRedisModulesConnection<K,V>
      Overrides:
      async in class io.lettuce.core.StatefulRedisConnectionImpl<K,V>
    • sync

      public RedisModulesCommands<K,V> sync()
      Specified by:
      sync in interface io.lettuce.core.api.StatefulRedisConnection<K,V>
      Specified by:
      sync in interface StatefulRedisModulesConnection<K,V>
      Overrides:
      sync in class io.lettuce.core.StatefulRedisConnectionImpl<K,V>
    • reactive

      public RedisModulesReactiveCommands<K,V> reactive()
      Specified by:
      reactive in interface io.lettuce.core.api.StatefulRedisConnection<K,V>
      Specified by:
      reactive in interface StatefulRedisModulesConnection<K,V>
      Overrides:
      reactive in class io.lettuce.core.StatefulRedisConnectionImpl<K,V>