vertx / io.vertx.reactivex.core.shareddata / AsyncMap

AsyncMap

open class AsyncMap<K : Any, V : Any>

An asynchronous map.

NOTE: This class has been automatically generated from the io.vertx.core.shareddata.AsyncMap non RX-ified interface using Vert.x codegen.

Constructors

<init>

AsyncMap(delegate: AsyncMap<Any, Any>)
AsyncMap(delegate: AsyncMap<Any, Any>, typeArg_0: TypeArg<K>, typeArg_1: TypeArg<V>)

Properties

__TYPE_ARG

static val __TYPE_ARG: TypeArg<AsyncMap<Any, Any>>

__typeArg_0

val __typeArg_0: TypeArg<K>

__typeArg_1

val __typeArg_1: TypeArg<V>

Functions

clear

open fun clear(resultHandler: Handler<AsyncResult<Void>>): Unit

Clear all entries in the map

equals

open fun equals(other: Any?): Boolean

get

open fun get(k: K, resultHandler: Handler<AsyncResult<V>>): Unit

Get a value from the map, asynchronously.

getDelegate

open fun getDelegate(): AsyncMap<Any, Any>

hashCode

open fun hashCode(): Int

newInstance

open static fun <K : Any, V : Any> newInstance(arg: AsyncMap<Any, Any>): AsyncMap<K, V>
open static fun <K : Any, V : Any> newInstance(arg: AsyncMap<Any, Any>, __typeArg_K: TypeArg<K>, __typeArg_V: TypeArg<V>): AsyncMap<K, V>

put

open fun put(k: K, v: V, completionHandler: Handler<AsyncResult<Void>>): Unit

Put a value in the map, asynchronously.

open fun put(k: K, v: V, ttl: Long, completionHandler: Handler<AsyncResult<Void>>): Unit

Like io.vertx.reactivex.core.shareddata.AsyncMap#put but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.

putIfAbsent

open fun putIfAbsent(k: K, v: V, completionHandler: Handler<AsyncResult<V>>): Unit

Put the entry only if there is no entry with the key already present. If key already present then the existing value will be returned to the handler, otherwise null.

open fun putIfAbsent(k: K, v: V, ttl: Long, completionHandler: Handler<AsyncResult<V>>): Unit

Link io.vertx.reactivex.core.shareddata.AsyncMap#putIfAbsent but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.

remove

open fun remove(k: K, resultHandler: Handler<AsyncResult<V>>): Unit

Remove a value from the map, asynchronously.

removeIfPresent

open fun removeIfPresent(k: K, v: V, resultHandler: Handler<AsyncResult<Boolean>>): Unit

Remove a value from the map, only if entry already exists with same value.

replace

open fun replace(k: K, v: V, resultHandler: Handler<AsyncResult<V>>): Unit

Replace the entry only if it is currently mapped to some value

replaceIfPresent

open fun replaceIfPresent(k: K, oldValue: V, newValue: V, resultHandler: Handler<AsyncResult<Boolean>>): Unit

Replace the entry only if it is currently mapped to a specific value

rxClear

open fun rxClear(): Completable

Clear all entries in the map

rxGet

open fun rxGet(k: K): Single<V>

Get a value from the map, asynchronously.

rxPut

open fun rxPut(k: K, v: V): Completable

Put a value in the map, asynchronously.

open fun rxPut(k: K, v: V, ttl: Long): Completable

Like io.vertx.reactivex.core.shareddata.AsyncMap#put but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.

rxPutIfAbsent

open fun rxPutIfAbsent(k: K, v: V): Single<V>

Put the entry only if there is no entry with the key already present. If key already present then the existing value will be returned to the handler, otherwise null.

open fun rxPutIfAbsent(k: K, v: V, ttl: Long): Single<V>

Link io.vertx.reactivex.core.shareddata.AsyncMap#putIfAbsent but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.

rxRemove

open fun rxRemove(k: K): Single<V>

Remove a value from the map, asynchronously.

rxRemoveIfPresent

open fun rxRemoveIfPresent(k: K, v: V): Single<Boolean>

Remove a value from the map, only if entry already exists with same value.

rxReplace

open fun rxReplace(k: K, v: V): Single<V>

Replace the entry only if it is currently mapped to some value

rxReplaceIfPresent

open fun rxReplaceIfPresent(k: K, oldValue: V, newValue: V): Single<Boolean>

Replace the entry only if it is currently mapped to a specific value

rxSize

open fun rxSize(): Single<Int>

Provide the number of entries in the map

size

open fun size(resultHandler: Handler<AsyncResult<Int>>): Unit

Provide the number of entries in the map

toString

open fun toString(): String