Interface RMultimapAsync<K,​V>

    • Method Detail

      • sizeAsync

        RFuture<Integer> sizeAsync()
        Returns the number of key-value pairs in this multimap.
        Returns:
        size of multimap
      • containsKeyAsync

        RFuture<Boolean> containsKeyAsync​(Object key)
        Returns true if this multimap contains at least one key-value pair with the key key.
        Parameters:
        key - - map key
        Returns:
        true if contains a key
      • containsValueAsync

        RFuture<Boolean> containsValueAsync​(Object value)
        Returns true if this multimap contains at least one key-value pair with the value value.
        Parameters:
        value - - map value
        Returns:
        true if contains a value
      • containsEntryAsync

        RFuture<Boolean> containsEntryAsync​(Object key,
                                            Object value)
        Returns true if this multimap contains at least one key-value pair with the key key and the value value.
        Parameters:
        key - - map key
        value - - map value
        Returns:
        true if contains an entry
      • putAsync

        RFuture<Boolean> putAsync​(K key,
                                  V value)
        Stores a key-value pair in this multimap.

        Some multimap implementations allow duplicate key-value pairs, in which case put always adds a new key-value pair and increases the multimap size by 1. Other implementations prohibit duplicates, and storing a key-value pair that's already in the multimap has no effect.

        Parameters:
        key - - map key
        value - - map value
        Returns:
        true if the method increased the size of the multimap, or false if the multimap already contained the key-value pair and doesn't allow duplicates
      • removeAsync

        RFuture<Boolean> removeAsync​(Object key,
                                     Object value)
        Removes a single key-value pair with the key key and the value value from this multimap, if such exists. If multiple key-value pairs in the multimap fit this description, which one is removed is unspecified.
        Parameters:
        key - - map key
        value - - map value
        Returns:
        true if the multimap changed
      • putAllAsync

        RFuture<Boolean> putAllAsync​(K key,
                                     Iterable<? extends V> values)
        Stores a key-value pair in this multimap for each of values, all using the same key, key. Equivalent to (but expected to be more efficient than):
           
        
           for (V value : values) {
             put(key, value);
           }

        In particular, this is a no-op if values is empty.

        Parameters:
        key - - map key
        values - - map values
        Returns:
        true if the multimap changed
      • replaceValuesAsync

        RFuture<Collection<V>> replaceValuesAsync​(K key,
                                                  Iterable<? extends V> values)
        Stores a collection of values with the same key, replacing any existing values for that key.

        If values is empty, this is equivalent to removeAllAsync(Object).

        Parameters:
        key - - map key
        values - - map values
        Returns:
        the collection of replaced values, or an empty collection if no values were previously associated with the key. The collection may be modifiable, but updating it will have no effect on the multimap.
      • removeAllAsync

        RFuture<Collection<V>> removeAllAsync​(Object key)
        Removes all values associated with the key key.

        Once this method returns, key will not be mapped to any values.

        Parameters:
        key - - map key
        Returns:
        the values that were removed (possibly empty). The returned collection may be modifiable, but updating it will have no effect on the multimap.
      • keySizeAsync

        RFuture<Integer> keySizeAsync()
        Returns the number of key-value pairs in this multimap.
        Returns:
        keys amount
      • fastRemoveAsync

        RFuture<Long> fastRemoveAsync​(K... keys)
        Removes keys from map by one operation Works faster than RMultimap.remove but not returning the value associated with key
        Parameters:
        keys - - map keys
        Returns:
        the number of keys that were removed from the hash, not including specified but non existing keys
      • readAllKeySetAsync

        RFuture<Set<K>> readAllKeySetAsync()
        Read all keys at once
        Returns:
        keys