io.vertx.rxjava.core.shareddata

## Class AsyncMap<K,V>

- java.lang.Object
- - io.vertx.rxjava.core.shareddata.AsyncMap<K,V>

-     public class AsyncMap<K,V>
      extends Object

  An asynchronous map.

  `AsyncMap` does not allow `null` to be used as a key or value.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<AsyncMap>` | `__TYPE_ARG`
    `io.vertx.lang.rx.TypeArg<K>` | `__typeArg_0`
    `io.vertx.lang.rx.TypeArg<V>` | `__typeArg_1`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AsyncMap(AsyncMap delegate)`
    `AsyncMap(AsyncMap delegate, io.vertx.lang.rx.TypeArg<K> typeArg_0, io.vertx.lang.rx.TypeArg<V> typeArg_1)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear(Handler<AsyncResult<Void>> resultHandler)` Clear all entries in the map
    `Observable<Void>` | `clearObservable()` Deprecated. use `rxClear()` instead
    `boolean` | `equals(Object o)`
    `void` | `get(K k, Handler<AsyncResult<V>> resultHandler)` Get a value from the map, asynchronously.
    `AsyncMap` | `getDelegate()`
    `Observable<V>` | `getObservable(K k)` Deprecated. use `rxGet(K)` instead
    `int` | `hashCode()`
    `static <K,V> AsyncMap<K,V>` | `newInstance(AsyncMap arg)`
    `static <K,V> AsyncMap<K,V>` | `newInstance(AsyncMap arg, io.vertx.lang.rx.TypeArg<K> __typeArg_K, io.vertx.lang.rx.TypeArg<V> __typeArg_V)`
    `void` | `put(K k, V v, Handler<AsyncResult<Void>> completionHandler)` Put a value in the map, asynchronously.
    `void` | `put(K k, V v, long ttl, Handler<AsyncResult<Void>> completionHandler)` Like `put(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)` but specifying a time to live for the entry.
    `void` | `putIfAbsent(K k, V v, Handler<AsyncResult<V>> completionHandler)` Put the entry only if there is no entry with the key already present.
    `void` | `putIfAbsent(K k, V v, long ttl, Handler<AsyncResult<V>> completionHandler)` Link `putIfAbsent(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<V>>)` but specifying a time to live for the entry.
    `Observable<V>` | `putIfAbsentObservable(K k, V v)` Deprecated. use `rxPutIfAbsent(K, V)` instead
    `Observable<V>` | `putIfAbsentObservable(K k, V v, long ttl)` Deprecated. use `rxPutIfAbsent(K, V)` instead
    `Observable<Void>` | `putObservable(K k, V v)` Deprecated. use `rxPut(K, V)` instead
    `Observable<Void>` | `putObservable(K k, V v, long ttl)` Deprecated. use `rxPut(K, V)` instead
    `void` | `remove(K k, Handler<AsyncResult<V>> resultHandler)` Remove a value from the map, asynchronously.
    `void` | `removeIfPresent(K k, V v, Handler<AsyncResult<Boolean>> resultHandler)` Remove a value from the map, only if entry already exists with same value.
    `Observable<Boolean>` | `removeIfPresentObservable(K k, V v)` Deprecated. use `rxRemoveIfPresent(K, V)` instead
    `Observable<V>` | `removeObservable(K k)` Deprecated. use `rxRemove(K)` instead
    `void` | `replace(K k, V v, Handler<AsyncResult<V>> resultHandler)` Replace the entry only if it is currently mapped to some value
    `void` | `replaceIfPresent(K k, V oldValue, V newValue, Handler<AsyncResult<Boolean>> resultHandler)` Replace the entry only if it is currently mapped to a specific value
    `Observable<Boolean>` | `replaceIfPresentObservable(K k, V oldValue, V newValue)` Deprecated. use `rxReplaceIfPresent(K, V, V)` instead
    `Observable<V>` | `replaceObservable(K k, V v)` Deprecated. use `rxReplace(K, V)` instead
    `Single<Void>` | `rxClear()` Clear all entries in the map
    `Single<V>` | `rxGet(K k)` Get a value from the map, asynchronously.
    `Single<Void>` | `rxPut(K k, V v)` Put a value in the map, asynchronously.
    `Single<Void>` | `rxPut(K k, V v, long ttl)` Like `put(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)` but specifying a time to live for the entry.
    `Single<V>` | `rxPutIfAbsent(K k, V v)` Put the entry only if there is no entry with the key already present.
    `Single<V>` | `rxPutIfAbsent(K k, V v, long ttl)` Link `putIfAbsent(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<V>>)` but specifying a time to live for the entry.
    `Single<V>` | `rxRemove(K k)` Remove a value from the map, asynchronously.
    `Single<Boolean>` | `rxRemoveIfPresent(K k, V v)` Remove a value from the map, only if entry already exists with same value.
    `Single<V>` | `rxReplace(K k, V v)` Replace the entry only if it is currently mapped to some value
    `Single<Boolean>` | `rxReplaceIfPresent(K k, V oldValue, V newValue)` Replace the entry only if it is currently mapped to a specific value
    `Single<Integer>` | `rxSize()` Provide the number of entries in the map
    `void` | `size(Handler<AsyncResult<Integer>> resultHandler)` Provide the number of entries in the map
    `Observable<Integer>` | `sizeObservable()` Deprecated. use `rxSize()` instead
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<AsyncMap> __TYPE_ARG

    - #### __typeArg_0

          public final io.vertx.lang.rx.TypeArg<K> __typeArg_0

    - #### __typeArg_1

          public final io.vertx.lang.rx.TypeArg<V> __typeArg_1

  - ### Constructor Detail

    - #### AsyncMap

          public AsyncMap(AsyncMap delegate)

    - #### AsyncMap

          public AsyncMap(AsyncMap delegate,
                          io.vertx.lang.rx.TypeArg<K> typeArg_0,
                          io.vertx.lang.rx.TypeArg<V> typeArg_1)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public AsyncMap getDelegate()

    - #### get

          public void get(K k,
                          Handler<AsyncResult<V>> resultHandler)

      Get a value from the map, asynchronously.
      Parameters:
        `k` - the key
        `resultHandler` - - this will be called some time later with the async result.

    - #### getObservable

          @Deprecated
          public Observable<V> getObservable(K k)

      Deprecated. use `rxGet(K)` instead
      Get a value from the map, asynchronously.
      Parameters:
        `k` - the key
      Returns:

    - #### rxGet

          public Single<V> rxGet(K k)

      Get a value from the map, asynchronously.
      Parameters:
        `k` - the key
      Returns:

    - #### put

          public void put(K k,
                          V v,
                          Handler<AsyncResult<Void>> completionHandler)

      Put a value in the map, asynchronously.
      Parameters:
        `k` - the key
        `v` - the value
        `completionHandler` - - this will be called some time later to signify the value has been put

    - #### putObservable

          @Deprecated
          public Observable<Void> putObservable(K k,
                                                            V v)

      Deprecated. use `rxPut(K, V)` instead
      Put a value in the map, asynchronously.
      Parameters:
        `k` - the key
        `v` - the value
      Returns:

    - #### rxPut

          public Single<Void> rxPut(K k,
                                    V v)

      Put a value in the map, asynchronously.
      Parameters:
        `k` - the key
        `v` - the value
      Returns:

    - #### put

          public void put(K k,
                          V v,
                          long ttl,
                          Handler<AsyncResult<Void>> completionHandler)

      Like `put(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)` but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.
      Parameters:
        `k` - the key
        `v` - the value
        `ttl` - The time to live (in ms) for the entry
        `completionHandler` - the handler

    - #### putObservable

          @Deprecated
          public Observable<Void> putObservable(K k,
                                                            V v,
                                                            long ttl)

      Deprecated. use `rxPut(K, V)` instead
      Like `put(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)` but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.
      Parameters:
        `k` - the key
        `v` - the value
        `ttl` - The time to live (in ms) for the entry
      Returns:

    - #### rxPut

          public Single<Void> rxPut(K k,
                                    V v,
                                    long ttl)

      Like `put(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)` but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.
      Parameters:
        `k` - the key
        `v` - the value
        `ttl` - The time to live (in ms) for the entry
      Returns:

    - #### putIfAbsent

          public void putIfAbsent(K k,
                                  V v,
                                  Handler<AsyncResult<V>> completionHandler)

      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.
      Parameters:
        `k` - the key
        `v` - the value
        `completionHandler` - the handler

    - #### putIfAbsentObservable

          @Deprecated
          public Observable<V> putIfAbsentObservable(K k,
                                                                 V v)

      Deprecated. use `rxPutIfAbsent(K, V)` instead
      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.
      Parameters:
        `k` - the key
        `v` - the value
      Returns:

    - #### rxPutIfAbsent

          public Single<V> rxPutIfAbsent(K k,
                                         V 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.
      Parameters:
        `k` - the key
        `v` - the value
      Returns:

    - #### putIfAbsent

          public void putIfAbsent(K k,
                                  V v,
                                  long ttl,
                                  Handler<AsyncResult<V>> completionHandler)

      Link `putIfAbsent(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<V>>)` but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.
      Parameters:
        `k` - the key
        `v` - the value
        `ttl` - The time to live (in ms) for the entry
        `completionHandler` - the handler

    - #### putIfAbsentObservable

          @Deprecated
          public Observable<V> putIfAbsentObservable(K k,
                                                                 V v,
                                                                 long ttl)

      Deprecated. use `rxPutIfAbsent(K, V)` instead
      Link `putIfAbsent(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<V>>)` but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.
      Parameters:
        `k` - the key
        `v` - the value
        `ttl` - The time to live (in ms) for the entry
      Returns:

    - #### rxPutIfAbsent

          public Single<V> rxPutIfAbsent(K k,
                                         V v,
                                         long ttl)

      Link `putIfAbsent(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<V>>)` but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.
      Parameters:
        `k` - the key
        `v` - the value
        `ttl` - The time to live (in ms) for the entry
      Returns:

    - #### remove

          public void remove(K k,
                             Handler<AsyncResult<V>> resultHandler)

      Remove a value from the map, asynchronously.
      Parameters:
        `k` - the key
        `resultHandler` - - this will be called some time later to signify the value has been removed

    - #### removeObservable

          @Deprecated
          public Observable<V> removeObservable(K k)

      Deprecated. use `rxRemove(K)` instead
      Remove a value from the map, asynchronously.
      Parameters:
        `k` - the key
      Returns:

    - #### rxRemove

          public Single<V> rxRemove(K k)

      Remove a value from the map, asynchronously.
      Parameters:
        `k` - the key
      Returns:

    - #### removeIfPresent

          public void removeIfPresent(K k,
                                      V v,
                                      Handler<AsyncResult<Boolean>> resultHandler)

      Remove a value from the map, only if entry already exists with same value.
      Parameters:
        `k` - the key
        `v` - the value
        `resultHandler` - - this will be called some time later to signify the value has been removed

    - #### removeIfPresentObservable

          @Deprecated
          public Observable<Boolean> removeIfPresentObservable(K k,
                                                                           V v)

      Deprecated. use `rxRemoveIfPresent(K, V)` instead
      Remove a value from the map, only if entry already exists with same value.
      Parameters:
        `k` - the key
        `v` - the value
      Returns:

    - #### rxRemoveIfPresent

          public Single<Boolean> rxRemoveIfPresent(K k,
                                                   V v)

      Remove a value from the map, only if entry already exists with same value.
      Parameters:
        `k` - the key
        `v` - the value
      Returns:

    - #### replace

          public void replace(K k,
                              V v,
                              Handler<AsyncResult<V>> resultHandler)

      Replace the entry only if it is currently mapped to some value
      Parameters:
        `k` - the key
        `v` - the new value
        `resultHandler` - the result handler will be passed the previous value

    - #### replaceObservable

          @Deprecated
          public Observable<V> replaceObservable(K k,
                                                             V v)

      Deprecated. use `rxReplace(K, V)` instead
      Replace the entry only if it is currently mapped to some value
      Parameters:
        `k` - the key
        `v` - the new value
      Returns:

    - #### rxReplace

          public Single<V> rxReplace(K k,
                                     V v)

      Replace the entry only if it is currently mapped to some value
      Parameters:
        `k` - the key
        `v` - the new value
      Returns:

    - #### replaceIfPresent

          public void replaceIfPresent(K k,
                                       V oldValue,
                                       V newValue,
                                       Handler<AsyncResult<Boolean>> resultHandler)

      Replace the entry only if it is currently mapped to a specific value
      Parameters:
        `k` - the key
        `oldValue` - the existing value
        `newValue` - the new value
        `resultHandler` - the result handler

    - #### replaceIfPresentObservable

          @Deprecated
          public Observable<Boolean> replaceIfPresentObservable(K k,
                                                                            V oldValue,
                                                                            V newValue)

      Deprecated. use `rxReplaceIfPresent(K, V, V)` instead
      Replace the entry only if it is currently mapped to a specific value
      Parameters:
        `k` - the key
        `oldValue` - the existing value
        `newValue` - the new value
      Returns:

    - #### rxReplaceIfPresent

          public Single<Boolean> rxReplaceIfPresent(K k,
                                                    V oldValue,
                                                    V newValue)

      Replace the entry only if it is currently mapped to a specific value
      Parameters:
        `k` - the key
        `oldValue` - the existing value
        `newValue` - the new value
      Returns:

    - #### clear

          public void clear(Handler<AsyncResult<Void>> resultHandler)

      Clear all entries in the map
      Parameters:
        `resultHandler` - called on completion

    - #### clearObservable

          @Deprecated
          public Observable<Void> clearObservable()

      Deprecated. use `rxClear()` instead
      Clear all entries in the map
      Returns:

    - #### rxClear

          public Single<Void> rxClear()

      Clear all entries in the map
      Returns:

    - #### size

          public void size(Handler<AsyncResult<Integer>> resultHandler)

      Provide the number of entries in the map
      Parameters:
        `resultHandler` - handler which will receive the number of entries

    - #### sizeObservable

          @Deprecated
          public Observable<Integer> sizeObservable()

      Deprecated. use `rxSize()` instead
      Provide the number of entries in the map
      Returns:

    - #### rxSize

          public Single<Integer> rxSize()

      Provide the number of entries in the map
      Returns:

    - #### newInstance

          public static <K,V> AsyncMap<K,V> newInstance(AsyncMap arg)

    - #### newInstance

          public static <K,V> AsyncMap<K,V> newInstance(AsyncMap arg,
                                                        io.vertx.lang.rx.TypeArg<K> __typeArg_K,
                                                        io.vertx.lang.rx.TypeArg<V> __typeArg_V)

Copyright © 2018 Eclipse. All rights reserved.