Package com.redislabs.lettusearch.impl
Class StatefulRediSearchConnectionImpl<K,V>
- java.lang.Object
-
- io.lettuce.core.RedisChannelHandler<K,V>
-
- io.lettuce.core.StatefulRedisConnectionImpl<K,V>
-
- com.redislabs.lettusearch.impl.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 oneStatefulRediSearchConnectionImplAConnectionWatchdogmonitors each connection and reconnects automatically untilRedisChannelHandler.close()is called. All pending commands will be (re)sent after successful reconnection.
-
-
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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RediSearchAsyncCommands<K,V>async()protected RediSearchAsyncCommandsImpl<K,V>newRedisAsyncCommandsImpl()Create a new instance ofRediSearchAsyncCommandsImpl.protected io.lettuce.core.RedisReactiveCommandsImpl<K,V>newRedisReactiveCommandsImpl()Create a new instance ofRediSearchReactiveCommandsImpl.protected RediSearchCommands<K,V>newRedisSyncCommandsImpl()Create a new instance ofRediSearchCommands.RediSearchReactiveCommands<K,V>reactive()RediSearchCommands<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, close, closeAsync, deactivated, flushCommands, getChannelWriter, getOptions, getResources, getTimeout, isClosed, isOpen, registerCloseables, 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
-
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
-
newRedisAsyncCommandsImpl
protected RediSearchAsyncCommandsImpl<K,V> newRedisAsyncCommandsImpl()
Create a new instance ofRediSearchAsyncCommandsImpl. Can be overriden to extend.
-
newRedisReactiveCommandsImpl
protected io.lettuce.core.RedisReactiveCommandsImpl<K,V> newRedisReactiveCommandsImpl()
Create a new instance ofRediSearchReactiveCommandsImpl. Can be overriden to extend.
-
newRedisSyncCommandsImpl
protected RediSearchCommands<K,V> newRedisSyncCommandsImpl()
Create a new instance ofRediSearchCommands. Can be overriden to extend.
-
async
public RediSearchAsyncCommands<K,V> async()
-
sync
public RediSearchCommands<K,V> sync()
-
-