ConcurrentMap

class ConcurrentMap<Key : Any, Value : Any> : 
    MutableMap<Key, Value>

Ktor concurrent map implementation. Please do not use it.

Constructors

<init>

ConcurrentMap(lock: Lock, map: Map<Key, Value>)
ConcurrentMap(
    lock: Lock = Lock(),
    initialCapacity: Int = INITIAL_CAPACITY)

Ktor concurrent map implementation. Please do not use it.

Properties

entries

val entries: MutableSet<MutableEntry<Key, Value>>

keys

val keys: MutableSet<Key>

size

val size: Int

values

Functions

clear

fun clear(): Unit

computeIfAbsent

fun computeIfAbsent(key: Key, block: () -> Value): Value

Computes block and inserts result in map. The block will be evaluated at most once.

containsKey

fun containsKey(key: Key): Boolean

containsValue

fun containsValue(value: Value): Boolean

get

fun get(key: Key): Value?

getOrDefault

fun getOrDefault(key: Key, block: () -> Value): Value

Perform concurrent insert.

isEmpty

fun isEmpty(): Boolean

put

fun put(key: Key, value: Value): Value?

putAll

fun putAll(from: Map<out Key, Value>): Unit

remove

fun remove(key: Key): Value?