io.vertx.core.spi.cluster

## Interface AsyncMultiMap<K,V>

-     public interface AsyncMultiMap<K,V>

  An asynchronous multi-map. A multi-map holds a Set of values against each key as opposed to a single value, as with a Map. A value appears only once for a key (no duplicated values for the same key). The cluster implementation should ensure that any entries placed in the map from any node are available on any node of the cluster.
  Author:
    Tim Fox

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(K k, V v, Handler<AsyncResult<Void>> completionHandler)` Add a value to the values for that key in the map.
    `void` | `get(K k, Handler<AsyncResult<ChoosableIterable<V>>> resultHandler)` Get the values from the map for the key.
    `void` | `remove(K k, V v, Handler<AsyncResult<Boolean>> completionHandler)` Remove a value from the values of that key in the map.
    `void` | `removeAllForValue(V v, Handler<AsyncResult<Void>> completionHandler)` Remove the specified value from all values found `equals` associated to all keys in the map.
    `void` | `removeAllMatching(java.util.function.Predicate<V> p, Handler<AsyncResult<Void>> completionHandler)` Remove values which satisfies the given predicate in all keys.

- - ### Method Detail

    - #### add

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

      Add a value to the values for that key in the map.
      Parameters:
        `k` - The key
        `v` - The value
        `completionHandler` - This will be called when the entry has been added

    - #### get

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

      Get the values from the map for the key. If the key isn't in the map, an empty `ChoosableIterable` must be returned.
      Parameters:
        `k` - The key
        `resultHandler` - This will be called with the list of values for the key. The type of the values returned must be `ChoosableIterable`

    - #### remove

          void remove(K k,
                      V v,
                      Handler<AsyncResult<Boolean>> completionHandler)

      Remove a value from the values of that key in the map.
      Parameters:
        `k` - The key
        `v` - The value
        `completionHandler` - This will be called with `true` if the value was found and `false` otherwise, when the remove is complete

    - #### removeAllForValue

          void removeAllForValue(V v,
                                 Handler<AsyncResult<Void>> completionHandler)

      Remove the specified value from all values found `equals` associated to all keys in the map.
      Parameters:
        `v` - The value
        `completionHandler` - This will be called when the remove is complete

    - #### removeAllMatching

          void removeAllMatching(java.util.function.Predicate<V> p,
                                 Handler<AsyncResult<Void>> completionHandler)

      Remove values which satisfies the given predicate in all keys.
      Parameters:
        `p` - The predicate
        `completionHandler` - This will be called when the remove is complete

Copyright © 2017. All rights reserved.