-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added unwatch with route and improved tests
- Loading branch information
Showing
6 changed files
with
235 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
java/client/src/main/java/glide/api/commands/TransactionsBaseClusterCommands.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** Copyright GLIDE-for-Redis Project Contributors - SPDX Identifier: Apache-2.0 */ | ||
package glide.api.commands; | ||
|
||
import glide.api.models.ClusterValue; | ||
import glide.api.models.configuration.RequestRoutingConfiguration.Route; | ||
import java.util.concurrent.CompletableFuture; | ||
|
||
/** | ||
* Supports commands for the "Transactions Commands" group for cluster clients. | ||
* | ||
* @see <a href="https://redis.io/commands/?group=transactions">Transactions Commands</a> | ||
*/ | ||
public interface TransactionsBaseClusterCommands { | ||
/** | ||
* Flushes all the previously watched keys for a transaction. Executing a transaction will | ||
* automatically flush all previously watched keys. | ||
* | ||
* @see <a href="https://redis.io/docs/latest/commands/unwatch/">redis.io</a> for details. | ||
* @param route Specifies the routing configuration for the command. The client will route the | ||
* command to the nodes defined by <code>route</code>. | ||
* @return The string <code>OK</code>. | ||
* @example | ||
* <pre>{@code | ||
* client.watch(new String[] {"sampleKey"}); | ||
* client.unwatch(ALL_PRIMARIES); // Flushes "sampleKey" from watched keys for all primary nodes. | ||
* }</pre> | ||
*/ | ||
CompletableFuture<ClusterValue<String>> unwatch(Route route); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters