SimpleBucketStateMapWithEviction

constructor(clock: Clock, stateMap: SimpleBucketStateMap = SimpleBucketStateMap(), ttlAfterLastAccess: Duration = 2.hours, expirationCheckInterval: Duration = 10.minutes, coroutineScope: CoroutineScope = CoroutineScope(Dispatchers.Default))

Parameters

clock

the clock to use to get the current time

stateMap

the state map to use to store the state

ttlAfterLastAccess

the time-to-live after the last access

expirationCheckInterval

the interval at which to check for expired keys

coroutineScope

the CoroutineScope to use to run the expiration check