Skip to content

Conversation

marcingrzejszczak
Copy link
Contributor

fixes #2853

Copy link
Member

@mp911de mp911de left a 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;
Copy link
Member

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);
Copy link
Member

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);
Copy link
Member

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.

@marcingrzejszczak
Copy link
Contributor Author

Changes applied

@mp911de mp911de added this to the 3.5 M2 (2025.0.0) milestone Feb 24, 2025
mp911de pushed a commit that referenced this pull request Feb 24, 2025
mp911de added a commit that referenced this pull request Feb 24, 2025
Reformat code, add since tags. Tweak Javadoc wording.

See #2853
Original pull request: #3017
@mp911de mp911de closed this Feb 24, 2025
@mp911de mp911de deleted the issue/2853 branch February 24, 2025 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add StringCommand for a SET with GET option
2 participants