Class 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 Mutiny-ified interface using Vert.x codegen.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.smallrye.mutiny.Uni<Void> clear()
      Clear all entries in the map
      Void clearAndAwait()
      Blocking variant of clear().
      void clearAndForget()
      Variant of clear() that ignores the result of the operation.
      boolean equals​(Object o)  
      io.smallrye.mutiny.Uni<V> get​(K k)
      Get a value from the map, asynchronously.
      V getAndAwait​(K k)
      Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#get(K).
      void getAndForget​(K k)
      Variant of io.vertx.mutiny.core.shareddata.AsyncMap#get(K) that ignores the result of the operation.
      io.vertx.core.shareddata.AsyncMap getDelegate()  
      int hashCode()  
      static <K,​V>
      AsyncMap<K,​V>
      newInstance​(io.vertx.core.shareddata.AsyncMap arg)  
      static <K,​V>
      AsyncMap<K,​V>
      newInstance​(io.vertx.core.shareddata.AsyncMap arg, TypeArg<K> __typeArg_K, TypeArg<V> __typeArg_V)  
      io.smallrye.mutiny.Uni<Void> put​(K k, V v)
      Put a value in the map, asynchronously.
      io.smallrye.mutiny.Uni<Void> put​(K k, V v, long ttl)
      Like put(K, V) but specifying a time to live for the entry.
      Void putAndAwait​(K k, V v)
      Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#put(K,V).
      Void putAndAwait​(K k, V v, long ttl)
      Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#put(K,V,long).
      void putAndForget​(K k, V v)
      Variant of io.vertx.mutiny.core.shareddata.AsyncMap#put(K,V) that ignores the result of the operation.
      void putAndForget​(K k, V v, long ttl)
      Variant of io.vertx.mutiny.core.shareddata.AsyncMap#put(K,V,long) that ignores the result of the operation.
      io.smallrye.mutiny.Uni<V> putIfAbsent​(K k, V v)
      Put the entry only if there is no entry with the key already present.
      io.smallrye.mutiny.Uni<V> putIfAbsent​(K k, V v, long ttl)
      Link putIfAbsent(K, V) but specifying a time to live for the entry.
      V putIfAbsentAndAwait​(K k, V v)
      Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#putIfAbsent(K,V).
      V putIfAbsentAndAwait​(K k, V v, long ttl)
      Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#putIfAbsent(K,V,long).
      void putIfAbsentAndForget​(K k, V v)
      Variant of io.vertx.mutiny.core.shareddata.AsyncMap#putIfAbsent(K,V) that ignores the result of the operation.
      void putIfAbsentAndForget​(K k, V v, long ttl)
      Variant of io.vertx.mutiny.core.shareddata.AsyncMap#putIfAbsent(K,V,long) that ignores the result of the operation.
      io.smallrye.mutiny.Uni<V> remove​(K k)
      Remove a value from the map, asynchronously.
      V removeAndAwait​(K k)
      Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#remove(K).
      void removeAndForget​(K k)
      Variant of io.vertx.mutiny.core.shareddata.AsyncMap#remove(K) that ignores the result of the operation.
      io.smallrye.mutiny.Uni<Boolean> removeIfPresent​(K k, V v)
      Remove a value from the map, only if entry already exists with same value.
      Boolean removeIfPresentAndAwait​(K k, V v)
      Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#removeIfPresent(K,V).
      void removeIfPresentAndForget​(K k, V v)
      Variant of io.vertx.mutiny.core.shareddata.AsyncMap#removeIfPresent(K,V) that ignores the result of the operation.
      io.smallrye.mutiny.Uni<V> replace​(K k, V v)
      Replace the entry only if it is currently mapped to some value
      io.smallrye.mutiny.Uni<V> replace​(K k, V v, long ttl)
      Replace the entry only if it is currently mapped to some value
      V replaceAndAwait​(K k, V v)
      Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#replace(K,V).
      V replaceAndAwait​(K k, V v, long ttl)
      Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#replace(K,V,long).
      void replaceAndForget​(K k, V v)
      Variant of io.vertx.mutiny.core.shareddata.AsyncMap#replace(K,V) that ignores the result of the operation.
      void replaceAndForget​(K k, V v, long ttl)
      Variant of io.vertx.mutiny.core.shareddata.AsyncMap#replace(K,V,long) that ignores the result of the operation.
      io.smallrye.mutiny.Uni<Boolean> replaceIfPresent​(K k, V oldValue, V newValue)
      Replace the entry only if it is currently mapped to a specific value
      io.smallrye.mutiny.Uni<Boolean> replaceIfPresent​(K k, V oldValue, V newValue, long ttl)
      Replace the entry only if it is currently mapped to a specific value
      Boolean replaceIfPresentAndAwait​(K k, V oldValue, V newValue)
      Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#replaceIfPresent(K,V,V).
      Boolean replaceIfPresentAndAwait​(K k, V oldValue, V newValue, long ttl)
      Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#replaceIfPresent(K,V,V,long).
      void replaceIfPresentAndForget​(K k, V oldValue, V newValue)
      Variant of io.vertx.mutiny.core.shareddata.AsyncMap#replaceIfPresent(K,V,V) that ignores the result of the operation.
      void replaceIfPresentAndForget​(K k, V oldValue, V newValue, long ttl)
      Variant of io.vertx.mutiny.core.shareddata.AsyncMap#replaceIfPresent(K,V,V,long) that ignores the result of the operation.
      io.smallrye.mutiny.Uni<Integer> size()
      Provide the number of entries in the map
      Integer sizeAndAwait()
      Blocking variant of size().
      void sizeAndForget()
      Variant of size() that ignores the result of the operation.
      String toString()  
    • Constructor Detail

      • AsyncMap

        public AsyncMap​(io.vertx.core.shareddata.AsyncMap delegate)
      • AsyncMap

        public AsyncMap​(io.vertx.core.shareddata.AsyncMap delegate,
                        TypeArg<K> typeArg_0,
                        TypeArg<V> typeArg_1)
    • Method Detail

      • getDelegate

        public io.vertx.core.shareddata.AsyncMap getDelegate()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • get

        public io.smallrye.mutiny.Uni<V> get​(K k)
        Get a value from the map, asynchronously.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        k - the key
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • getAndAwait

        public V getAndAwait​(K k)
        Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#get(K).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        k - the key
        Returns:
        the V instance produced by the operation.
      • getAndForget

        public void getAndForget​(K k)
        Variant of io.vertx.mutiny.core.shareddata.AsyncMap#get(K) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.core.shareddata.AsyncMap#get(K), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.core.shareddata.AsyncMap#get(K) but you don't need to compose it with other operations.

        Parameters:
        k - the key
      • put

        public io.smallrye.mutiny.Uni<Void> put​(K k,
                                                V v)
        Put a value in the map, asynchronously.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        k - the key
        v - the value
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • putAndAwait

        public Void putAndAwait​(K k,
                                V v)
        Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#put(K,V).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        k - the key
        v - the value
        Returns:
        the Void instance produced by the operation.
      • putAndForget

        public void putAndForget​(K k,
                                 V v)
        Variant of io.vertx.mutiny.core.shareddata.AsyncMap#put(K,V) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.core.shareddata.AsyncMap#put(K,V), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.core.shareddata.AsyncMap#put(K,V) but you don't need to compose it with other operations.

        Parameters:
        k - the key
        v - the value
      • put

        public io.smallrye.mutiny.Uni<Void> put​(K k,
                                                V v,
                                                long ttl)
        Like put(K, V) but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        k - the key
        v - the value
        ttl - The time to live (in ms) for the entry
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • putAndAwait

        public Void putAndAwait​(K k,
                                V v,
                                long ttl)
        Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#put(K,V,long).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        k - the key
        v - the value
        ttl - The time to live (in ms) for the entry
        Returns:
        the Void instance produced by the operation.
      • putAndForget

        public void putAndForget​(K k,
                                 V v,
                                 long ttl)
        Variant of io.vertx.mutiny.core.shareddata.AsyncMap#put(K,V,long) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.core.shareddata.AsyncMap#put(K,V,long), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.core.shareddata.AsyncMap#put(K,V,long) but you don't need to compose it with other operations.

        Parameters:
        k - the key
        v - the value
        ttl - The time to live (in ms) for the entry
      • putIfAbsent

        public io.smallrye.mutiny.Uni<V> putIfAbsent​(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.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        k - the key
        v - the value
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • putIfAbsentAndAwait

        public V putIfAbsentAndAwait​(K k,
                                     V v)
        Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#putIfAbsent(K,V).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        k - the key
        v - the value
        Returns:
        the V instance produced by the operation.
      • putIfAbsentAndForget

        public void putIfAbsentAndForget​(K k,
                                         V v)
        Variant of io.vertx.mutiny.core.shareddata.AsyncMap#putIfAbsent(K,V) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.core.shareddata.AsyncMap#putIfAbsent(K,V), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.core.shareddata.AsyncMap#putIfAbsent(K,V) but you don't need to compose it with other operations.

        Parameters:
        k - the key
        v - the value
      • putIfAbsent

        public io.smallrye.mutiny.Uni<V> putIfAbsent​(K k,
                                                     V v,
                                                     long ttl)
        Link putIfAbsent(K, V) but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        k - the key
        v - the value
        ttl - The time to live (in ms) for the entry
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • putIfAbsentAndAwait

        public V putIfAbsentAndAwait​(K k,
                                     V v,
                                     long ttl)
        Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#putIfAbsent(K,V,long).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        k - the key
        v - the value
        ttl - The time to live (in ms) for the entry
        Returns:
        the V instance produced by the operation.
      • putIfAbsentAndForget

        public void putIfAbsentAndForget​(K k,
                                         V v,
                                         long ttl)
        Variant of io.vertx.mutiny.core.shareddata.AsyncMap#putIfAbsent(K,V,long) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.core.shareddata.AsyncMap#putIfAbsent(K,V,long), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.core.shareddata.AsyncMap#putIfAbsent(K,V,long) but you don't need to compose it with other operations.

        Parameters:
        k - the key
        v - the value
        ttl - The time to live (in ms) for the entry
      • remove

        public io.smallrye.mutiny.Uni<V> remove​(K k)
        Remove a value from the map, asynchronously.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        k - the key
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • removeAndAwait

        public V removeAndAwait​(K k)
        Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#remove(K).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        k - the key
        Returns:
        the V instance produced by the operation.
      • removeAndForget

        public void removeAndForget​(K k)
        Variant of io.vertx.mutiny.core.shareddata.AsyncMap#remove(K) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.core.shareddata.AsyncMap#remove(K), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.core.shareddata.AsyncMap#remove(K) but you don't need to compose it with other operations.

        Parameters:
        k - the key
      • removeIfPresent

        public io.smallrye.mutiny.Uni<Boolean> removeIfPresent​(K k,
                                                               V v)
        Remove a value from the map, only if entry already exists with same value.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        k - the key
        v - the value
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • removeIfPresentAndAwait

        public Boolean removeIfPresentAndAwait​(K k,
                                               V v)
        Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#removeIfPresent(K,V).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        k - the key
        v - the value
        Returns:
        the Boolean instance produced by the operation.
      • removeIfPresentAndForget

        public void removeIfPresentAndForget​(K k,
                                             V v)
        Variant of io.vertx.mutiny.core.shareddata.AsyncMap#removeIfPresent(K,V) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.core.shareddata.AsyncMap#removeIfPresent(K,V), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.core.shareddata.AsyncMap#removeIfPresent(K,V) but you don't need to compose it with other operations.

        Parameters:
        k - the key
        v - the value
      • replace

        public io.smallrye.mutiny.Uni<V> replace​(K k,
                                                 V v)
        Replace the entry only if it is currently mapped to some value

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        k - the key
        v - the new value
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • replaceAndAwait

        public V replaceAndAwait​(K k,
                                 V v)
        Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#replace(K,V).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        k - the key
        v - the new value
        Returns:
        the V instance produced by the operation.
      • replaceAndForget

        public void replaceAndForget​(K k,
                                     V v)
        Variant of io.vertx.mutiny.core.shareddata.AsyncMap#replace(K,V) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.core.shareddata.AsyncMap#replace(K,V), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.core.shareddata.AsyncMap#replace(K,V) but you don't need to compose it with other operations.

        Parameters:
        k - the key
        v - the new value
      • replace

        public io.smallrye.mutiny.Uni<V> replace​(K k,
                                                 V v,
                                                 long ttl)
        Replace the entry only if it is currently mapped to some value

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        k - the key
        v - the new value
        ttl - The time to live (in ms) for the entry
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • replaceAndAwait

        public V replaceAndAwait​(K k,
                                 V v,
                                 long ttl)
        Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#replace(K,V,long).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        k - the key
        v - the new value
        ttl - The time to live (in ms) for the entry
        Returns:
        the V instance produced by the operation.
      • replaceAndForget

        public void replaceAndForget​(K k,
                                     V v,
                                     long ttl)
        Variant of io.vertx.mutiny.core.shareddata.AsyncMap#replace(K,V,long) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.core.shareddata.AsyncMap#replace(K,V,long), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.core.shareddata.AsyncMap#replace(K,V,long) but you don't need to compose it with other operations.

        Parameters:
        k - the key
        v - the new value
        ttl - The time to live (in ms) for the entry
      • replaceIfPresent

        public io.smallrye.mutiny.Uni<Boolean> replaceIfPresent​(K k,
                                                                V oldValue,
                                                                V newValue)
        Replace the entry only if it is currently mapped to a specific value

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        k - the key
        oldValue - the existing value
        newValue - the new value
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • replaceIfPresentAndAwait

        public Boolean replaceIfPresentAndAwait​(K k,
                                                V oldValue,
                                                V newValue)
        Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#replaceIfPresent(K,V,V).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        k - the key
        oldValue - the existing value
        newValue - the new value
        Returns:
        the Boolean instance produced by the operation.
      • replaceIfPresentAndForget

        public void replaceIfPresentAndForget​(K k,
                                              V oldValue,
                                              V newValue)
        Variant of io.vertx.mutiny.core.shareddata.AsyncMap#replaceIfPresent(K,V,V) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.core.shareddata.AsyncMap#replaceIfPresent(K,V,V), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.core.shareddata.AsyncMap#replaceIfPresent(K,V,V) but you don't need to compose it with other operations.

        Parameters:
        k - the key
        oldValue - the existing value
        newValue - the new value
      • replaceIfPresent

        public io.smallrye.mutiny.Uni<Boolean> replaceIfPresent​(K k,
                                                                V oldValue,
                                                                V newValue,
                                                                long ttl)
        Replace the entry only if it is currently mapped to a specific value

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        k - the key
        oldValue - the existing value
        newValue - the new value
        ttl - The time to live (in ms) for the entry
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • replaceIfPresentAndAwait

        public Boolean replaceIfPresentAndAwait​(K k,
                                                V oldValue,
                                                V newValue,
                                                long ttl)
        Blocking variant of io.vertx.mutiny.core.shareddata.AsyncMap#replaceIfPresent(K,V,V,long).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        k - the key
        oldValue - the existing value
        newValue - the new value
        ttl - The time to live (in ms) for the entry
        Returns:
        the Boolean instance produced by the operation.
      • replaceIfPresentAndForget

        public void replaceIfPresentAndForget​(K k,
                                              V oldValue,
                                              V newValue,
                                              long ttl)
        Variant of io.vertx.mutiny.core.shareddata.AsyncMap#replaceIfPresent(K,V,V,long) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.core.shareddata.AsyncMap#replaceIfPresent(K,V,V,long), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.core.shareddata.AsyncMap#replaceIfPresent(K,V,V,long) but you don't need to compose it with other operations.

        Parameters:
        k - the key
        oldValue - the existing value
        newValue - the new value
        ttl - The time to live (in ms) for the entry
      • clear

        public io.smallrye.mutiny.Uni<Void> clear()
        Clear all entries in the map

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • clearAndAwait

        public Void clearAndAwait()
        Blocking variant of clear().

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Returns:
        the Void instance produced by the operation.
      • clearAndForget

        public void clearAndForget()
        Variant of clear() that ignores the result of the operation.

        This method subscribes on the result of clear(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from clear() but you don't need to compose it with other operations.

      • size

        public io.smallrye.mutiny.Uni<Integer> size()
        Provide the number of entries in the map

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • sizeAndAwait

        public Integer sizeAndAwait()
        Blocking variant of size().

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Returns:
        the Integer instance produced by the operation.
      • sizeAndForget

        public void sizeAndForget()
        Variant of size() that ignores the result of the operation.

        This method subscribes on the result of size(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from size() but you don't need to compose it with other operations.

      • newInstance

        public static <K,​V> AsyncMap<K,​V> newInstance​(io.vertx.core.shareddata.AsyncMap arg)
      • newInstance

        public static <K,​V> AsyncMap<K,​V> newInstance​(io.vertx.core.shareddata.AsyncMap arg,
                                                                  TypeArg<K> __typeArg_K,
                                                                  TypeArg<V> __typeArg_V)