forked from valkey-io/valkey-glide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added part of the 'String Commands' group to RedisClient as specified…
… on the official Redis website.
- Loading branch information
1 parent
21e0cbc
commit 6340d2f
Showing
6 changed files
with
450 additions
and
1 deletion.
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
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
21 changes: 20 additions & 1 deletion
21
java/client/src/main/java/glide/api/commands/StringCommands.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 |
---|---|---|
@@ -1,14 +1,33 @@ | ||
package glide.api.commands; | ||
|
||
import glide.api.models.commands.SetOptions; | ||
import java.util.HashMap; | ||
import java.util.concurrent.CompletableFuture; | ||
|
||
/** String Commands interface to handle single commands that return Strings. */ | ||
/** | ||
* String Commands interface. | ||
* | ||
* @see: <a href="https://redis.io/commands/?group=string">String Commands</a> | ||
*/ | ||
public interface StringCommands { | ||
|
||
CompletableFuture<String> get(String key); | ||
|
||
CompletableFuture<Void> set(String key, String value); | ||
|
||
CompletableFuture<String> set(String key, String value, SetOptions options); | ||
|
||
CompletableFuture<Long> decr(String key); | ||
|
||
CompletableFuture<Long> decrBy(String key, long amount); | ||
|
||
CompletableFuture<Long> incr(String key); | ||
|
||
CompletableFuture<Long> incrBy(String key, long amount); | ||
|
||
CompletableFuture<Double> incrByFloat(String key, double amount); | ||
|
||
CompletableFuture<Object[]> mget(String[] keys); | ||
|
||
CompletableFuture<Void> mset(HashMap<String, String> keyValueMap); | ||
} |
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
Oops, something went wrong.