-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds support for Redis setGet command #3017
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some reactive and interface bits are missing. Care to have a look?
@@ -62,15 +63,23 @@ class SetCommand extends KeyCommand { | |||
private @Nullable ByteBuffer value; | |||
private Expiration expiration; | |||
private SetOption option; | |||
private boolean get; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That isn't going to work as the set
API returns a boolean response.
* @see <a href="https://redis.io/commands/set">Redis Documentation: SET</a> | ||
* @since 3.4 | ||
*/ | ||
Flux<ByteBufferResponse<SetCommand>> setGet(ByteBuffer key, ByteBuffer value, Expiration expiration, SetOption option); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we need both signatures, Mono<ByteBuffer> setGet(ByteBuffer key, ByteBuffer value, Expiration expiration, SetOption option) {
and Flux<ByteBufferResponse<SetCommand>> set(Publisher<SetCommand> commands);
The first one delegates to the latter.
* @see <a href="https://redis.io/commands/set">Redis Documentation: SET</a> | ||
* @since 3.4 | ||
*/ | ||
V setGet(K key, V value, long timeout, TimeUnit unit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to update BoundValueOperations
(the interface) and ReactiveValueOperations
as well.
Changes applied |
fixes #2853