Interface CounterStateStore

All Superinterfaces:
AutoCloseable, StateStore

public interface CounterStateStore extends StateStore
The state store supports counters.
  • Method Details

    • incrCounter

      void incrCounter(String key, long amount)
      Increment the builtin distributed counter referred by key.
      Parameters:
      key - The name of the key
      amount - The amount to be incremented
    • incrCounterAsync

      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.
      Parameters:
      key - The name of the key
      amount - The amount to be incremented
    • getCounter

      long getCounter(String key)
      Retrieve the counter value for the key.
      Parameters:
      key - name of the key
      Returns:
      the amount of the counter value for this key
    • getCounterAsync

      CompletableFuture<Long> getCounterAsync(String key)
      Retrieve the counter value for the key, but don't wait for the operation to be completed.
      Parameters:
      key - name of the key
      Returns:
      the amount of the counter value for this key