|
v0.1.0
|


Public Member Functions | |
| void | set (String key, String value) |
| String | get (String key) |
| boolean | delete (String key) |
| void | increment (String key, int increment) |
| void | increment (String key) |
| String | execute (String command, String... args) |
| java.util.concurrent.CompletableFuture< String > | executeAsync (String command, String... args) |
The primary client for interacting with the kvstore database.
Implementations of this interface are completely thread-safe and are designed to be used across multiple threads in high-throughput applications. Users should instantiate this via KvClientBuilder.
| boolean me.ccute.kvstore.sdk.client.KvClient.delete | ( | String | key | ) |
Deletes the given key and its associated value from the database.
| key | The unique identifier for the data. Cannot be null or empty. |
| KvException | if a network or server error occurs. |
Implemented in me.ccute.kvstore.sdk.client.NettyKvClient.
| String me.ccute.kvstore.sdk.client.KvClient.execute | ( | String | command, |
| String... | args ) |
Executes a raw command against the server. Useful for CLI tools or invoking custom server commands not yet typed in the SDK.
| command | The command to execute (e.g., "SET"). |
| args | The arguments for the command. |
| KvException | if the command fails or times out. |
Implemented in me.ccute.kvstore.sdk.client.NettyKvClient.
| java.util.concurrent.CompletableFuture< String > me.ccute.kvstore.sdk.client.KvClient.executeAsync | ( | String | command, |
| String... | args ) |
Executes a command asynchronously, returning a Future. Perfect for high-throughput pipelining.
Implemented in me.ccute.kvstore.sdk.client.NettyKvClient.
| String me.ccute.kvstore.sdk.client.KvClient.get | ( | String | key | ) |
Retrieves the value associated with the given key.
| key | The unique identifier for the data. Cannot be null or empty. |
| KvException | if a network or server error occurs. |
Implemented in me.ccute.kvstore.sdk.client.NettyKvClient.
| void me.ccute.kvstore.sdk.client.KvClient.increment | ( | String | key | ) |
Increments the numeric value stored at the specified key by exactly 1.
This is a convenience method equivalent to calling increment(key, 1).
| key | The unique identifier for the data. Cannot be null or empty. |
Implemented in me.ccute.kvstore.sdk.client.NettyKvClient.
| void me.ccute.kvstore.sdk.client.KvClient.increment | ( | String | key, |
| int | increment ) |
Increments the numeric value stored at the specified key by the given amount.
If the key does not exist, it is initialized to 0 before performing the increment. If the stored value cannot be parsed as an integer, a KvException is thrown.
| key | The unique identifier for the data. Cannot be null or empty. |
| increment | The amount to add to the current value. Can be negative to decrement. |
| IllegalArgumentException | if the key is invalid. |
| KvException | if a network error occurs or the existing value is not a number. |
Implemented in me.ccute.kvstore.sdk.client.NettyKvClient.
| void me.ccute.kvstore.sdk.client.KvClient.set | ( | String | key, |
| String | value ) |
Stores a value in the database associated with the given key.
| key | The unique identifier for the data. Cannot be null or empty. |
| value | The string value to store. Cannot be null. |
| IllegalArgumentException | if the key or value is invalid. |
| KvException | if a network or server error occurs. |
Implemented in me.ccute.kvstore.sdk.client.NettyKvClient.