open class LocalMap<K : Any, V : Any>
Local maps can be used to share data safely in a single Vert.x instance.
The map only allows immutable keys and values in the map, OR certain mutable objects such as io.vertx.reactivex.core.buffer.Buffer instances which will be copied when they are added to the map.
This ensures there is no shared access to mutable state from different threads (e.g. different event loops) in the Vert.x instance, and means you don't have to protect access to that state using synchronization or locks.
Your own objects can be marked as immutable by implementing the io.vertx.reactivex.core.shareddata.Shareable interface. Since the version 3.4, this class extends the interface. However some methods are only accessible in Java.
NOTE: This class has been automatically generated from the io.vertx.core.shareddata.LocalMap non RX-ified interface using Vert.x codegen.
LocalMap(: LocalMap<Any, Any>)LocalMap(: LocalMap<Any, Any>, : TypeArg<K>, : TypeArg<V>) |
static val __TYPE_ARG: TypeArg<LocalMap<Any, Any>> |
|
val __typeArg_0: TypeArg<K> |
|
val __typeArg_1: TypeArg<V> |
open fun clear(): Unit
Clear all entries in the map |
|
open fun close(): Unit
Close and release the map |
|
open fun containsKey(: Any): Boolean
Returns |
|
open fun containsValue(: Any): Boolean
Returns @{code true} if this map maps one or more keys to the specified value. |
|
open fun equals(: Any?): Boolean |
|
open fun get(: Any): V
Get a value from the map |
|
open fun getDelegate(): LocalMap<Any, Any> |
|
open fun getOrDefault(: Any, : V): V
Returns the value to which the specified key is mapped, or |
|
open fun hashCode(): Int |
|
open fun isEmpty(): Boolean |
|
open static fun <K : Any, V : Any> newInstance(: LocalMap<Any, Any>): LocalMap<K, V>open static fun <K : Any, V : Any> newInstance(: LocalMap<Any, Any>, : TypeArg<K>, : TypeArg<V>): LocalMap<K, V> |
|
open fun put(: K, : V): V
Put an entry in the map |
|
open fun putIfAbsent(: K, : V): V
Put the entry only if there is no existing entry for that key |
|
open fun remove(: Any): V
Remove an entry from the map |
|
open fun removeIfPresent(: K, : V): Boolean
Remove the entry only if there is an entry with the specified key and value. This method is the poyglot version of |
|
open fun replace(: K, : V): V
Replace the entry only if there is an existing entry with the key |
|
open fun replaceIfPresent(: K, : V, : V): Boolean
Replace the entry only if there is an existing entry with the specified key and value. This method is the polyglot version of |
|
open fun size(): Int
Get the size of the map |
|
open fun toString(): String |