io.vertx.core.spi.cluster

## Interface AsyncMultiMap<K,V>

-     public interface AsyncMultiMap<K,V>

  An asynchronous multi-map. A multi-map holds a List of values against each key as opposed to a single value, as with a Map. 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 list of values for that key in the map
    `void` | `get(K k, Handler<AsyncResult<ChoosableIterable<V>>> resultHandler)` Get a list of values from the map for the key
    `void` | `remove(K k, V v, Handler<AsyncResult<Boolean>> completionHandler)` Remove a value from the list of values for that key in the map.
    `void` | `removeAllForValue(V v, Handler<AsyncResult<Void>> completionHandler)` Remove all the specified values from all keys in the map

- - ### Method Detail

    - #### add

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

      Add a value to the list of 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 a list of values from the map for the key
      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 list of values for that key in the map.
      Parameters:
        `k` - The key
        `v` - The value
        `completionHandler` - This will be called when the remove is complete

    - #### removeAllForValue

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

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

Copyright © 2015. All Rights Reserved.