Skip to content

Commit

Permalink
Revert GO changes from release-1.2, fix java lint
Browse files Browse the repository at this point in the history
Signed-off-by: barshaul <barshaul@amazon.com>
  • Loading branch information
barshaul committed Nov 6, 2024
1 parent d94e7ca commit d0b7b59
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 126 deletions.
16 changes: 2 additions & 14 deletions go/api/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,7 @@ type StringCommands interface {
// Sets multiple keys to multiple values in a single operation.
//
// Note:
// In cluster mode, if keys in `keyValueMap` map to different hash slots,
// the command will be split across these slots and executed separately for each.
// This means the command is atomic only at the slot level. If one or more slot-specific
// requests fail, the entire call will return the first encountered error, even
// though some requests may have succeeded while others did not.
// If this behavior impacts your application logic, consider splitting the
// request into sub-requests per slot to ensure atomicity.
// When in cluster mode, the command may route to multiple nodes when keys in keyValueMap map to different hash slots.
//
// See [valkey.io] for details.
//
Expand All @@ -159,13 +153,7 @@ type StringCommands interface {
// Retrieves the values of multiple keys.
//
// Note:
// In cluster mode, if keys in `keys` map to different hash slots,
// the command will be split across these slots and executed separately for each.
// This means the command is atomic only at the slot level. If one or more slot-specific
// requests fail, the entire call will return the first encountered error, even
// though some requests may have succeeded while others did not.
// If this behavior impacts your application logic, consider splitting the
// request into sub-requests per slot to ensure atomicity.
// When in cluster mode, the command may route to multiple nodes when keys map to different hash slots.
//
// See [valkey.io] for details.
//
Expand Down
112 changes: 48 additions & 64 deletions java/client/src/main/java/glide/api/commands/GenericBaseCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ public interface GenericBaseCommands {
* Removes the specified <code>keys</code> from the database. A key is ignored if it does not
* exist.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots,
* the command will be split across these slots and executed separately for each.
* This means the command is atomic only at the slot level. If one or more slot-specific
* requests fail, the entire call will return the first encountered error, even
* though some requests may have succeeded while others did not.
* If this behavior impacts your application logic, consider splitting the
* request into sub-requests per slot to ensure atomicity.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots, the command
* will be split across these slots and executed separately for each. This means the command
* is atomic only at the slot level. If one or more slot-specific requests fail, the entire
* call will return the first encountered error, even though some requests may have succeeded
* while others did not. If this behavior impacts your application logic, consider splitting
* the request into sub-requests per slot to ensure atomicity.
* @see <a href="https://valkey.io/commands/del/">valkey.io</a> for details.
* @param keys The keys we wanted to remove.
* @return The number of keys that were removed.
Expand All @@ -46,14 +44,12 @@ public interface GenericBaseCommands {
* Removes the specified <code>keys</code> from the database. A key is ignored if it does not
* exist.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots,
* the command will be split across these slots and executed separately for each.
* This means the command is atomic only at the slot level. If one or more slot-specific
* requests fail, the entire call will return the first encountered error, even
* though some requests may have succeeded while others did not.
* If this behavior impacts your application logic, consider splitting the
* request into sub-requests per slot to ensure atomicity.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots, the command
* will be split across these slots and executed separately for each. This means the command
* is atomic only at the slot level. If one or more slot-specific requests fail, the entire
* call will return the first encountered error, even though some requests may have succeeded
* while others did not. If this behavior impacts your application logic, consider splitting
* the request into sub-requests per slot to ensure atomicity.
* @see <a href="https://valkey.io/commands/del/">valkey.io</a> for details.
* @param keys The keys we wanted to remove.
* @return The number of keys that were removed.
Expand All @@ -68,14 +64,12 @@ public interface GenericBaseCommands {
/**
* Returns the number of keys in <code>keys</code> that exist in the database.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots,
* the command will be split across these slots and executed separately for each.
* This means the command is atomic only at the slot level. If one or more slot-specific
* requests fail, the entire call will return the first encountered error, even
* though some requests may have succeeded while others did not.
* If this behavior impacts your application logic, consider splitting the
* request into sub-requests per slot to ensure atomicity.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots, the command
* will be split across these slots and executed separately for each. This means the command
* is atomic only at the slot level. If one or more slot-specific requests fail, the entire
* call will return the first encountered error, even though some requests may have succeeded
* while others did not. If this behavior impacts your application logic, consider splitting
* the request into sub-requests per slot to ensure atomicity.
* @see <a href="https://valkey.io/commands/exists/">valkey.io</a> for details.
* @param keys The keys list to check.
* @return The number of keys that exist. If the same existing key is mentioned in <code>keys
Expand All @@ -91,14 +85,12 @@ public interface GenericBaseCommands {
/**
* Returns the number of keys in <code>keys</code> that exist in the database.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots,
* the command will be split across these slots and executed separately for each.
* This means the command is atomic only at the slot level. If one or more slot-specific
* requests fail, the entire call will return the first encountered error, even
* though some requests may have succeeded while others did not.
* If this behavior impacts your application logic, consider splitting the
* request into sub-requests per slot to ensure atomicity.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots, the command
* will be split across these slots and executed separately for each. This means the command
* is atomic only at the slot level. If one or more slot-specific requests fail, the entire
* call will return the first encountered error, even though some requests may have succeeded
* while others did not. If this behavior impacts your application logic, consider splitting
* the request into sub-requests per slot to ensure atomicity.
* @see <a href="https://valkey.io/commands/exists/">valkey.io</a> for details.
* @param keys The keys list to check.
* @return The number of keys that exist. If the same existing key is mentioned in <code>keys
Expand All @@ -117,14 +109,12 @@ public interface GenericBaseCommands {
* specified keys and ignores non-existent ones. However, this command does not block the server,
* while <a href="https://valkey.io/commands/del/">DEL</a> does.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots,
* the command will be split across these slots and executed separately for each.
* This means the command is atomic only at the slot level. If one or more slot-specific
* requests fail, the entire call will return the first encountered error, even
* though some requests may have succeeded while others did not.
* If this behavior impacts your application logic, consider splitting the
* request into sub-requests per slot to ensure atomicity.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots, the command
* will be split across these slots and executed separately for each. This means the command
* is atomic only at the slot level. If one or more slot-specific requests fail, the entire
* call will return the first encountered error, even though some requests may have succeeded
* while others did not. If this behavior impacts your application logic, consider splitting
* the request into sub-requests per slot to ensure atomicity.
* @see <a href="https://valkey.io/commands/unlink/">valkey.io</a> for details.
* @param keys The list of keys to unlink.
* @return The number of <code>keys</code> that were unlinked.
Expand All @@ -142,14 +132,12 @@ public interface GenericBaseCommands {
* specified keys and ignores non-existent ones. However, this command does not block the server,
* while <a href="https://valkey.io/commands/del/">DEL</a> does.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots,
* the command will be split across these slots and executed separately for each.
* This means the command is atomic only at the slot level. If one or more slot-specific
* requests fail, the entire call will return the first encountered error, even
* though some requests may have succeeded while others did not.
* If this behavior impacts your application logic, consider splitting the
* request into sub-requests per slot to ensure atomicity.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots, the command
* will be split across these slots and executed separately for each. This means the command
* is atomic only at the slot level. If one or more slot-specific requests fail, the entire
* call will return the first encountered error, even though some requests may have succeeded
* while others did not. If this behavior impacts your application logic, consider splitting
* the request into sub-requests per slot to ensure atomicity.
* @see <a href="https://valkey.io/commands/unlink/">valkey.io</a> for details.
* @param keys The list of keys to unlink.
* @return The number of <code>keys</code> that were unlinked.
Expand Down Expand Up @@ -988,14 +976,12 @@ CompletableFuture<Boolean> pexpireAt(
/**
* Updates the last access time of specified <code>keys</code>.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots,
* the command will be split across these slots and executed separately for each.
* This means the command is atomic only at the slot level. If one or more slot-specific
* requests fail, the entire call will return the first encountered error, even
* though some requests may have succeeded while others did not.
* If this behavior impacts your application logic, consider splitting the
* request into sub-requests per slot to ensure atomicity.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots, the command
* will be split across these slots and executed separately for each. This means the command
* is atomic only at the slot level. If one or more slot-specific requests fail, the entire
* call will return the first encountered error, even though some requests may have succeeded
* while others did not. If this behavior impacts your application logic, consider splitting
* the request into sub-requests per slot to ensure atomicity.
* @see <a href="https://valkey.io/commands/touch/">valkey.io</a> for details.
* @param keys The keys to update last access time.
* @return The number of keys that were updated.
Expand All @@ -1010,14 +996,12 @@ CompletableFuture<Boolean> pexpireAt(
/**
* Updates the last access time of specified <code>keys</code>.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots,
* the command will be split across these slots and executed separately for each.
* This means the command is atomic only at the slot level. If one or more slot-specific
* requests fail, the entire call will return the first encountered error, even
* though some requests may have succeeded while others did not.
* If this behavior impacts your application logic, consider splitting the
* request into sub-requests per slot to ensure atomicity.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots, the command
* will be split across these slots and executed separately for each. This means the command
* is atomic only at the slot level. If one or more slot-specific requests fail, the entire
* call will return the first encountered error, even though some requests may have succeeded
* while others did not. If this behavior impacts your application logic, consider splitting
* the request into sub-requests per slot to ensure atomicity.
* @see <a href="https://valkey.io/commands/touch/">valkey.io</a> for details.
* @param keys The keys to update last access time.
* @return The number of keys that were updated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,12 @@ public interface StringBaseCommands {
/**
* Retrieves the values of multiple <code>keys</code>.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots,
* the command will be split across these slots and executed separately for each.
* This means the command is atomic only at the slot level. If one or more slot-specific
* requests fail, the entire call will return the first encountered error, even
* though some requests may have succeeded while others did not.
* If this behavior impacts your application logic, consider splitting the
* request into sub-requests per slot to ensure atomicity.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots, the command
* will be split across these slots and executed separately for each. This means the command
* is atomic only at the slot level. If one or more slot-specific requests fail, the entire
* call will return the first encountered error, even though some requests may have succeeded
* while others did not. If this behavior impacts your application logic, consider splitting
* the request into sub-requests per slot to ensure atomicity.
* @see <a href="https://valkey.io/commands/mget/">valkey.io</a> for details.
* @param keys A list of keys to retrieve values for.
* @return An array of values corresponding to the provided <code>keys</code>.<br>
Expand All @@ -273,14 +271,12 @@ public interface StringBaseCommands {
/**
* Retrieves the values of multiple <code>keys</code>.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots,
* the command will be split across these slots and executed separately for each.
* This means the command is atomic only at the slot level. If one or more slot-specific
* requests fail, the entire call will return the first encountered error, even
* though some requests may have succeeded while others did not.
* If this behavior impacts your application logic, consider splitting the
* request into sub-requests per slot to ensure atomicity.
*
* @apiNote In cluster mode, if keys in <code>keys</code> map to different hash slots, the command
* will be split across these slots and executed separately for each. This means the command
* is atomic only at the slot level. If one or more slot-specific requests fail, the entire
* call will return the first encountered error, even though some requests may have succeeded
* while others did not. If this behavior impacts your application logic, consider splitting
* the request into sub-requests per slot to ensure atomicity.
* @see <a href="https://valkey.io/commands/mget/">valkey.io</a> for details.
* @param keys A list of keys to retrieve values for.
* @return An array of values corresponding to the provided <code>keys</code>.<br>
Expand All @@ -297,14 +293,12 @@ public interface StringBaseCommands {
/**
* Sets multiple keys to multiple values in a single operation.
*
* @apiNote In cluster mode, if keys in <code>keyValueMap</code> map to different hash slots,
* the command will be split across these slots and executed separately for each.
* This means the command is atomic only at the slot level. If one or more slot-specific
* requests fail, the entire call will return the first encountered error, even
* though some requests may have succeeded while others did not.
* If this behavior impacts your application logic, consider splitting the
* request into sub-requests per slot to ensure atomicity.
*
* @apiNote In cluster mode, if keys in <code>keyValueMap</code> map to different hash slots, the
* command will be split across these slots and executed separately for each. This means the
* command is atomic only at the slot level. If one or more slot-specific requests fail, the
* entire call will return the first encountered error, even though some requests may have
* succeeded while others did not. If this behavior impacts your application logic, consider
* splitting the request into sub-requests per slot to ensure atomicity.
* @see <a href="https://valkey.io/commands/mset/">valkey.io</a> for details.
* @param keyValueMap A key-value map consisting of keys and their respective values to set.
* @return A simple <code>OK</code> response.
Expand All @@ -319,14 +313,12 @@ public interface StringBaseCommands {
/**
* Sets multiple keys to multiple values in a single operation.
*
* @apiNote In cluster mode, if keys in <code>keyValueMap</code> map to different hash slots,
* the command will be split across these slots and executed separately for each.
* This means the command is atomic only at the slot level. If one or more slot-specific
* requests fail, the entire call will return the first encountered error, even
* though some requests may have succeeded while others did not.
* If this behavior impacts your application logic, consider splitting the
* request into sub-requests per slot to ensure atomicity.
*
* @apiNote In cluster mode, if keys in <code>keyValueMap</code> map to different hash slots, the
* command will be split across these slots and executed separately for each. This means the
* command is atomic only at the slot level. If one or more slot-specific requests fail, the
* entire call will return the first encountered error, even though some requests may have
* succeeded while others did not. If this behavior impacts your application logic, consider
* splitting the request into sub-requests per slot to ensure atomicity.
* @see <a href="https://valkey.io/commands/mset/">valkey.io</a> for details.
* @param keyValueMap A key-value map consisting of keys and their respective values to set.
* @return A simple <code>OK</code> response.
Expand Down
Loading

0 comments on commit d0b7b59

Please sign in to comment.