Class AsyncMap<K,​V>

  • All Implemented Interfaces:
    RxDelegate

    public class AsyncMap<K,​V>
    extends Object
    implements RxDelegate
    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.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.reactivex.rxjava3.core.Completable clear()
      Clear all entries in the map
      boolean equals​(Object o)  
      io.reactivex.rxjava3.core.Maybe<V> get​(K k)
      Get a value from the map, asynchronously.
      AsyncMap getDelegate()  
      int hashCode()  
      io.reactivex.rxjava3.core.Single<Set<K>> keys()
      Get the keys of the map, asynchronously.
      static <K,​V>
      AsyncMap<K,​V>
      newInstance​(AsyncMap arg)  
      static <K,​V>
      AsyncMap<K,​V>
      newInstance​(AsyncMap arg, TypeArg<K> __typeArg_K, TypeArg<V> __typeArg_V)  
      io.reactivex.rxjava3.core.Completable put​(K k, V v)
      Put a value in the map, asynchronously.
      io.reactivex.rxjava3.core.Completable put​(K k, V v, long ttl)
      Like put(K, V) but specifying a time to live for the entry.
      io.reactivex.rxjava3.core.Maybe<V> putIfAbsent​(K k, V v)
      Put the entry only if there is no entry with the key already present.
      io.reactivex.rxjava3.core.Maybe<V> putIfAbsent​(K k, V v, long ttl)
      Link putIfAbsent(K, V) but specifying a time to live for the entry.
      io.reactivex.rxjava3.core.Maybe<V> remove​(K k)
      Remove a value from the map, asynchronously.
      io.reactivex.rxjava3.core.Single<Boolean> removeIfPresent​(K k, V v)
      Remove a value from the map, only if entry already exists with same value.
      io.reactivex.rxjava3.core.Maybe<V> replace​(K k, V v)
      Replace the entry only if it is currently mapped to some value
      io.reactivex.rxjava3.core.Maybe<V> replace​(K k, V v, long ttl)
      Replace the entry only if it is currently mapped to some value
      io.reactivex.rxjava3.core.Single<Boolean> replaceIfPresent​(K k, V oldValue, V newValue)
      Replace the entry only if it is currently mapped to a specific value
      io.reactivex.rxjava3.core.Single<Boolean> replaceIfPresent​(K k, V oldValue, V newValue, long ttl)
      Replace the entry only if it is currently mapped to a specific value
      io.reactivex.rxjava3.core.Completable rxClear()
      Clear all entries in the map
      io.reactivex.rxjava3.core.Maybe<V> rxGet​(K k)
      Get a value from the map, asynchronously.
      io.reactivex.rxjava3.core.Single<Set<K>> rxKeys()
      Get the keys of the map, asynchronously.
      io.reactivex.rxjava3.core.Completable rxPut​(K k, V v)
      Put a value in the map, asynchronously.
      io.reactivex.rxjava3.core.Completable rxPut​(K k, V v, long ttl)
      Like put(K, V) but specifying a time to live for the entry.
      io.reactivex.rxjava3.core.Maybe<V> rxPutIfAbsent​(K k, V v)
      Put the entry only if there is no entry with the key already present.
      io.reactivex.rxjava3.core.Maybe<V> rxPutIfAbsent​(K k, V v, long ttl)
      Link putIfAbsent(K, V) but specifying a time to live for the entry.
      io.reactivex.rxjava3.core.Maybe<V> rxRemove​(K k)
      Remove a value from the map, asynchronously.
      io.reactivex.rxjava3.core.Single<Boolean> rxRemoveIfPresent​(K k, V v)
      Remove a value from the map, only if entry already exists with same value.
      io.reactivex.rxjava3.core.Maybe<V> rxReplace​(K k, V v)
      Replace the entry only if it is currently mapped to some value
      io.reactivex.rxjava3.core.Maybe<V> rxReplace​(K k, V v, long ttl)
      Replace the entry only if it is currently mapped to some value
      io.reactivex.rxjava3.core.Single<Boolean> rxReplaceIfPresent​(K k, V oldValue, V newValue)
      Replace the entry only if it is currently mapped to a specific value
      io.reactivex.rxjava3.core.Single<Boolean> rxReplaceIfPresent​(K k, V oldValue, V newValue, long ttl)
      Replace the entry only if it is currently mapped to a specific value
      io.reactivex.rxjava3.core.Single<Integer> rxSize()
      Provide the number of entries in the map
      io.reactivex.rxjava3.core.Single<List<V>> rxValues()
      Get the values of the map, asynchronously.
      io.reactivex.rxjava3.core.Single<Integer> size()
      Provide the number of entries in the map
      String toString()  
      io.reactivex.rxjava3.core.Single<List<V>> values()
      Get the values of the map, asynchronously.
    • Method Detail

      • hashCode

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

        public io.reactivex.rxjava3.core.Maybe<V> get​(K k)
        Get a value from the map, asynchronously.
        Parameters:
        k - the key
        Returns:
      • rxGet

        public io.reactivex.rxjava3.core.Maybe<V> rxGet​(K k)
        Get a value from the map, asynchronously.
        Parameters:
        k - the key
        Returns:
      • put

        public io.reactivex.rxjava3.core.Completable put​(K k,
                                                         V v)
        Put a value in the map, asynchronously.
        Parameters:
        k - the key
        v - the value
        Returns:
      • rxPut

        public io.reactivex.rxjava3.core.Completable rxPut​(K k,
                                                           V v)
        Put a value in the map, asynchronously.
        Parameters:
        k - the key
        v - the value
        Returns:
      • put

        public io.reactivex.rxjava3.core.Completable 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.
        Parameters:
        k - the key
        v - the value
        ttl - The time to live (in ms) for the entry
        Returns:
      • rxPut

        public io.reactivex.rxjava3.core.Completable rxPut​(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.
        Parameters:
        k - the key
        v - the value
        ttl - The time to live (in ms) for the entry
        Returns:
      • putIfAbsent

        public io.reactivex.rxjava3.core.Maybe<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.
        Parameters:
        k - the key
        v - the value
        Returns:
      • rxPutIfAbsent

        public io.reactivex.rxjava3.core.Maybe<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 io.reactivex.rxjava3.core.Maybe<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.
        Parameters:
        k - the key
        v - the value
        ttl - The time to live (in ms) for the entry
        Returns:
      • rxPutIfAbsent

        public io.reactivex.rxjava3.core.Maybe<V> rxPutIfAbsent​(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.
        Parameters:
        k - the key
        v - the value
        ttl - The time to live (in ms) for the entry
        Returns:
      • remove

        public io.reactivex.rxjava3.core.Maybe<V> remove​(K k)
        Remove a value from the map, asynchronously.
        Parameters:
        k - the key
        Returns:
      • rxRemove

        public io.reactivex.rxjava3.core.Maybe<V> rxRemove​(K k)
        Remove a value from the map, asynchronously.
        Parameters:
        k - the key
        Returns:
      • removeIfPresent

        public io.reactivex.rxjava3.core.Single<Boolean> removeIfPresent​(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:
      • rxRemoveIfPresent

        public io.reactivex.rxjava3.core.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 io.reactivex.rxjava3.core.Maybe<V> replace​(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:
      • rxReplace

        public io.reactivex.rxjava3.core.Maybe<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:
      • replace

        public io.reactivex.rxjava3.core.Maybe<V> replace​(K k,
                                                          V v,
                                                          long ttl)
        Replace the entry only if it is currently mapped to some value
        Parameters:
        k - the key
        v - the new value
        ttl - The time to live (in ms) for the entry
        Returns:
      • rxReplace

        public io.reactivex.rxjava3.core.Maybe<V> rxReplace​(K k,
                                                            V v,
                                                            long ttl)
        Replace the entry only if it is currently mapped to some value
        Parameters:
        k - the key
        v - the new value
        ttl - The time to live (in ms) for the entry
        Returns:
      • replaceIfPresent

        public io.reactivex.rxjava3.core.Single<Boolean> replaceIfPresent​(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:
      • rxReplaceIfPresent

        public io.reactivex.rxjava3.core.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:
      • replaceIfPresent

        public io.reactivex.rxjava3.core.Single<Boolean> replaceIfPresent​(K k,
                                                                          V oldValue,
                                                                          V newValue,
                                                                          long ttl)
        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
        ttl - The time to live (in ms) for the entry
        Returns:
      • rxReplaceIfPresent

        public io.reactivex.rxjava3.core.Single<Boolean> rxReplaceIfPresent​(K k,
                                                                            V oldValue,
                                                                            V newValue,
                                                                            long ttl)
        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
        ttl - The time to live (in ms) for the entry
        Returns:
      • clear

        public io.reactivex.rxjava3.core.Completable clear()
        Clear all entries in the map
        Returns:
      • rxClear

        public io.reactivex.rxjava3.core.Completable rxClear()
        Clear all entries in the map
        Returns:
      • size

        public io.reactivex.rxjava3.core.Single<Integer> size()
        Provide the number of entries in the map
        Returns:
      • rxSize

        public io.reactivex.rxjava3.core.Single<Integer> rxSize()
        Provide the number of entries in the map
        Returns:
      • keys

        public io.reactivex.rxjava3.core.Single<Set<K>> keys()
        Get the keys of the map, asynchronously.

        Use this method with care as the map may contain a large number of keys, which may not fit entirely in memory of a single node. In this case, the invocation will result in an OutOfMemoryError.

        Returns:
      • rxKeys

        public io.reactivex.rxjava3.core.Single<Set<K>> rxKeys()
        Get the keys of the map, asynchronously.

        Use this method with care as the map may contain a large number of keys, which may not fit entirely in memory of a single node. In this case, the invocation will result in an OutOfMemoryError.

        Returns:
      • values

        public io.reactivex.rxjava3.core.Single<List<V>> values()
        Get the values of the map, asynchronously.

        Use this method with care as the map may contain a large number of values, which may not fit entirely in memory of a single node. In this case, the invocation will result in an OutOfMemoryError.

        Returns:
      • rxValues

        public io.reactivex.rxjava3.core.Single<List<V>> rxValues()
        Get the values of the map, asynchronously.

        Use this method with care as the map may contain a large number of values, which may not fit entirely in memory of a single node. In this case, the invocation will result in an OutOfMemoryError.

        Returns:
      • newInstance

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