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.

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AsyncMap(AsyncMap delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear(Handler<AsyncResult<Void>> resultHandler)` Clear all entries in the map
    `rx.Observable<Void>` | `clearObservable()` Clear all entries in the map
    `void` | `get(K k, Handler<AsyncResult<V>> resultHandler)` Get a value from the map, asynchronously.
    `Object` | `getDelegate()`
    `rx.Observable<V>` | `getObservable(K k)` Get a value from the map, asynchronously.
    `static <K,V> AsyncMap<K,V>` | `newInstance(AsyncMap arg)`
    `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 `AsyncMap` but specifying a timeout.
    `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 `AsyncMap` but specifying a timeout.
    `rx.Observable<V>` | `putIfAbsentObservable(K k, V v)` Put the entry only if there is no entry with the key already present.
    `rx.Observable<V>` | `putIfAbsentObservable(K k, V v, long ttl)` Link `AsyncMap` but specifying a timeout.
    `rx.Observable<Void>` | `putObservable(K k, V v)` Put a value in the map, asynchronously.
    `rx.Observable<Void>` | `putObservable(K k, V v, long ttl)` Like `AsyncMap` but specifying a timeout.
    `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.
    `rx.Observable<Boolean>` | `removeIfPresentObservable(K k, V v)` Remove a value from the map, only if entry already exists with same value.
    `rx.Observable<V>` | `removeObservable(K k)` Remove a value from the map, asynchronously.
    `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
    `rx.Observable<Boolean>` | `replaceIfPresentObservable(K k, V oldValue, V newValue)` Replace the entry only if it is currently mapped to a specific value
    `rx.Observable<V>` | `replaceObservable(K k, V v)` Replace the entry only if it is currently mapped to some value
    `void` | `size(Handler<AsyncResult<Integer>> resultHandler)` Provide the number of entries in the map
    `rx.Observable<Integer>` | `sizeObservable()` Provide the number of entries in the map

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AsyncMap

          public AsyncMap(AsyncMap delegate)

  - ### Method Detail

    - #### getDelegate

          public Object 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

          public rx.Observable<V> getObservable(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

          public rx.Observable<Void> putObservable(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 `AsyncMap` but specifying a timeout. If the value cannot be put within the timeout a failure will be passed to the handler
      Parameters:
        `k` - the key
        `v` - the value
        `ttl` - The time to live (in ms) for the entry
        `completionHandler` - the handler

    - #### putObservable

          public rx.Observable<Void> putObservable(K k,
                                                   V v,
                                                   long ttl)

      Like `AsyncMap` but specifying a timeout. If the value cannot be put within the timeout a failure will be passed to the handler
      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

          public rx.Observable<V> putIfAbsentObservable(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 `AsyncMap` but specifying a timeout. If the value cannot be put within the timeout a failure will be passed to the handler
      Parameters:
        `k` - the key
        `v` - the value
        `ttl` - The time to live (in ms) for the entry
        `completionHandler` - the handler

    - #### putIfAbsentObservable

          public rx.Observable<V> putIfAbsentObservable(K k,
                                                        V v,
                                                        long ttl)

      Link `AsyncMap` but specifying a timeout. If the value cannot be put within the timeout a failure will be passed to the handler
      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

          public rx.Observable<V> removeObservable(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

          public rx.Observable<Boolean> removeIfPresentObservable(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

          public rx.Observable<V> replaceObservable(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

          public rx.Observable<Boolean> replaceIfPresentObservable(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

          public rx.Observable<Void> clearObservable()

      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

          public rx.Observable<Integer> sizeObservable()

      Provide the number of entries in the map
      Returns:

    - #### newInstance

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

Copyright © 2015. All rights reserved.