Class StatefulRediSearchConnectionImpl<K,​V>

  • Type Parameters:
    K - Key type.
    V - Value type.
    All Implemented Interfaces:
    StatefulRediSearchConnection<K,​V>, 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 StatefulRediSearchConnectionImpl<K,​V>
    extends io.lettuce.core.StatefulRedisConnectionImpl<K,​V>
    implements StatefulRediSearchConnection<K,​V>
    A thread-safe connection to a RediSearch server. Multiple threads may share one StatefulRediSearchConnectionImpl A ConnectionWatchdog monitors each connection and reconnects automatically until RedisChannelHandler.close() is called. All pending commands will be (re)sent after successful reconnection.
    • Field Summary

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

        async, codec, multi, reactive, sync
    • Constructor Summary

      Constructors 
      Constructor Description
      StatefulRediSearchConnectionImpl​(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

      • StatefulRediSearchConnectionImpl

        public StatefulRediSearchConnectionImpl​(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 RediSearchReactiveCommandsImpl. Can be overriden to extend.
        Overrides:
        newRedisReactiveCommandsImpl in class io.lettuce.core.StatefulRedisConnectionImpl<K,​V>
      • newRedisSyncCommandsImpl

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