MemoryStateStorage

class MemoryStateStorage(bucketStateMap: BucketStateMap = SimpleBucketStateMap()) : StateStorage

Implementation of StateStorage that stores the state in memory.

Parameters

bucketStateMap

The BucketStateMap to use to store the state.

Constructors

Link copied to clipboard
constructor(bucketStateMap: BucketStateMap = SimpleBucketStateMap())

Functions

Link copied to clipboard
open suspend override fun compareAndSet(key: String, compareAndSetFunction: (current: BucketState?) -> BucketState)

Set the state of the bucket for the given key.

Link copied to clipboard
open override fun getBucketState(key: String): BucketState?

Get the state of the bucket for the given key.