Interface ReactiveRedisConnection
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Subinterfaces:
ReactiveRedisClusterConnection
Redis connection using reactive infrastructure declaring entry points for reactive command execution.
ReactiveRedisConnection
is typically implemented by a stateful object that requires to be closed
once it is no longer required.
Commands can be either executed by passing plain arguments like key
, value
or wrapped inside a
command stream. Streaming command execution accepts Publisher
of a particular
ReactiveRedisConnection.Command
. Commands are executed at the time their emission.
Arguments are binary-safe by using ByteBuffer
arguments. Expect ByteBuffer
to be consumed by
ReactiveRedisConnection
invocation or during execution. Any ByteBuffer
used as method parameter
should not be altered after invocation.
- Since:
- 2.0
- Author:
- Christoph Strobl, Mark Paluch
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
ReactiveRedisConnection.CommandResponse
implementation forByteBuffer
responses for absent keys.static class
ReactiveRedisConnection.CommandResponse
implementation forBoolean
responses.static class
ReactiveRedisConnection.CommandResponse
implementation forByteBuffer
responses.static interface
Base interface for Redis commands executed with a reactive infrastructure.static class
Base class for command responses.static class
ReactiveRedisConnection.Command
for key-bound operations.static class
static class
ReactiveRedisConnection.CommandResponse
implementation forList
responses.static class
ReactiveRedisConnection.NumericResponse<I,
O extends Number> ReactiveRedisConnection.CommandResponse
implementation fornumeric
responses.static class
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
close()
reactor.core.publisher.Mono<Void>
Asynchronously close the connection and release associated resources.GetReactiveHashCommands
.GetReactiveKeyCommands
.GetReactiveListCommands
.reactor.core.publisher.Mono<String>
ping()
Test connection.GetReactiveSetCommands
.GetReactiveZSetCommands
.
-
Method Details
-
close
default void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
closeLater
reactor.core.publisher.Mono<Void> closeLater()Asynchronously close the connection and release associated resources.- Returns:
- the
Mono
signaling when done.
-
keyCommands
ReactiveKeyCommands keyCommands()GetReactiveKeyCommands
.- Returns:
- never null.
-
stringCommands
ReactiveStringCommands stringCommands()- Returns:
- never null.
-
numberCommands
ReactiveNumberCommands numberCommands()- Returns:
- never null.
-
listCommands
ReactiveListCommands listCommands()GetReactiveListCommands
.- Returns:
- never null.
-
setCommands
ReactiveSetCommands setCommands()GetReactiveSetCommands
.- Returns:
- never null.
-
zSetCommands
ReactiveZSetCommands zSetCommands()GetReactiveZSetCommands
.- Returns:
- never null.
-
hashCommands
ReactiveHashCommands hashCommands()GetReactiveHashCommands
.- Returns:
- never null.
-
geoCommands
ReactiveGeoCommands geoCommands()- Returns:
- never null.
-
hyperLogLogCommands
ReactiveHyperLogLogCommands hyperLogLogCommands()- Returns:
- never null.
-
pubSubCommands
ReactivePubSubCommands pubSubCommands()- Returns:
- never null.
- Since:
- 2.1
-
scriptingCommands
ReactiveScriptingCommands scriptingCommands()- Returns:
- never null.
-
serverCommands
ReactiveServerCommands serverCommands()- Returns:
- never null.
-
streamCommands
ReactiveStreamCommands streamCommands()- Returns:
- never null.
- Since:
- 2.2
-
ping
reactor.core.publisher.Mono<String> ping()Test connection.- Returns:
Mono
wrapping server response message - usually PONG.- See Also:
-