public interface CounterStateStore extends StateStore
| Modifier and Type | Method and Description |
|---|---|
long |
getCounter(String key)
Retrieve the counter value for the key.
|
CompletableFuture<Long> |
getCounterAsync(String key)
Retrieve the counter value for the key, but don't wait
for the operation to be completed
|
void |
incrCounter(String key,
long amount)
Increment the builtin distributed counter referred by key.
|
CompletableFuture<Void> |
incrCounterAsync(String key,
long amount)
Increment the builtin distributed counter referred by key
but dont wait for the completion of the increment operation
|
void incrCounter(String key, long amount)
key - The name of the keyamount - The amount to be incrementedCompletableFuture<Void> incrCounterAsync(String key, long amount)
key - The name of the keyamount - The amount to be incrementedlong getCounter(String key)
key - name of the keyCompletableFuture<Long> getCounterAsync(String key)
key - name of the keyCopyright © 2017–2022 Apache Software Foundation. All rights reserved.