orbit-util / orbit.util.concurrent / AsyncMap

AsyncMap

interface AsyncMap<K, V>

Functions

compareAndSet

abstract suspend fun compareAndSet(key: K, initialValue: V?, newValue: V?): Boolean

count

abstract suspend fun count(): Long

get

abstract suspend fun get(key: K): V?

getOrPut

open suspend fun getOrPut(key: K, block: suspend () -> V): V

getValue

open suspend fun getValue(key: K): V

manipulate

open suspend fun manipulate(key: K, block: (V?) -> V?): V?

remove

abstract suspend fun remove(key: K): Boolean

Inheritors

HashMapBackedAsyncMap

abstract class HashMapBackedAsyncMap<K, V> : AsyncMap<K, V>