Skip to content
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

Add GET/SET/INFO/PING commands #66

Conversation

acarbonetto
Copy link

No description provided.

@acarbonetto acarbonetto force-pushed the java/integ_acarbo_api_getsetinfoping branch from 9927bd9 to 92cd1f0 Compare January 25, 2024 22:52
* Add base command; add custom command

---------

Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
@acarbonetto acarbonetto force-pushed the java/dev_acarbo_api_getsetinfoping branch from df8b07d to 926d04e Compare January 25, 2024 23:12
* @see <a href="https://redis.io/commands/set/">redis.io</a> for details.
* @param key - The key to store.
* @param value - The value to store with the given key.
* @return null
Copy link

@aaron-congo aaron-congo Jan 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
* @return null
* @return A CompletableFuture that can be used to wait for the command to complete. Set has no return value, so the CompletableFuture will return null.

Comment on lines +192 to +193
* @return string or null If value isn't set because of `onlyIfExists` or `onlyIfDoesNotExist`
* conditions, return null. If `returnOldValue` is set, return the old value as a string.
Copy link

@aaron-congo aaron-congo Jan 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking from the python docs:

Suggested change
* @return string or null If value isn't set because of `onlyIfExists` or `onlyIfDoesNotExist`
* conditions, return null. If `returnOldValue` is set, return the old value as a string.
* @return The old value as a string of `returnOldValue` is set. Otherwise, if the value isn't set because of `onlyIfExists` or `onlyIfDoesNotExist` conditions, return null. Otherwise, return "OK".

/**
* Converts options enum into a String[] to add to a {@link glide.api.models.Command}
*
* @return String[]
Copy link

@aaron-congo aaron-congo Jan 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @return String[]
* @return The sections held by this InfoOptions as an array of strings

Comment on lines +34 to +37
* Check for errors in the Response and return null Throws an error if an unexpected value is
* returned
*
* @return null if the response is empty

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use the @throws tag here?

Suggested change
* Check for errors in the Response and return null Throws an error if an unexpected value is
* returned
*
* @return null if the response is empty
* Check for errors in the Response and return null.
*
* @return null if the response is empty
* @throws RedisException if an unexpected (non-null) value is returned

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment on lines +95 to +96
* @param arguments
* @return
Copy link

@aaron-congo aaron-congo Jan 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
* @param arguments
* @return
* @param arguments The desired set options
* @return The passed in arguments as an array of strings

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capitalize?

Comment on lines +34 to +37
* Check for errors in the Response and return null Throws an error if an unexpected value is
* returned
*
* @return null if the response is empty

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment on lines +95 to +96
* @param arguments
* @return

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capitalize?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave here tests which required for coverage only, all rest you can move to IT

@Yury-Fridlyand
Copy link

Please, add a PR description and examples, especially for set with options and info with options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants