Interface IgniteMap<K,V>

Type Parameters:
K - The type of the key.
V - The type of the value.

public interface IgniteMap<K,V>
An object that maps keys to values. A map cannot contain duplicate keys; each key can map to at most one value.
  • Method Details

    • putAsync

      CompletableFuture<V> putAsync(K key, V value)
      Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
      Returns:
      the previous value associated with key, or null if there was no mapping for key.
    • put

      @Nullable V put(K key, V value)
      Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
      Returns:
      the previous value associated with key, or null if there was no mapping for key.
    • removeAsync

      CompletableFuture<V> removeAsync(K key)
      Removes the mapping for a key from this map if it is present.
      Returns:
      the value to which this map previously associated the key, or null if the map contained no mapping for the key.
    • remove

      @Nullable V remove(K key)
      Removes the mapping for a key from this map if it is present.
      Returns:
      the value to which this map previously associated the key, or null if the map contained no mapping for the key.
    • putAllAsync

      CompletableFuture<Void> putAllAsync(Map<? extends K,? extends V> m)
      Copies all of the mappings from the specified map to this map. The effect of this call is equivalent to that of calling putAsync on this map once for each mapping from key k to value v in the specified map.
    • putAll

      void putAll(Map<? extends K,? extends V> m)
      Copies all of the mappings from the specified map to this map (optional operation). The effect of this call is equivalent to that of calling putAsync on this map once for each mapping from key k to value v in the specified map.
    • getAsync

      CompletableFuture<V> getAsync(K key)
      Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
    • get

      @Nullable V get(K key)
      Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
    • containsKeyAsync

      CompletableFuture<Boolean> containsKeyAsync(K key)
      Returns true if this map contains a mapping for the specified key. More formally, returns true if and only if this map contains a mapping for a key k such that Objects.equals(key, k). (There can be at most one such mapping.)
    • containsKey

      boolean containsKey(K key)
      Returns true if this map contains a mapping for the specified key. More formally, returns true if and only if this map contains a mapping for a key k such that Objects.equals(key, k). (There can be at most one such mapping.)
    • sizeAsync

      CompletableFuture<Long> sizeAsync()
      Returns the number of key-value mappings in this map.
    • size

      long size()
      Returns the number of key-value mappings in this map.
    • isEmptyAsync

      CompletableFuture<Boolean> isEmptyAsync()
      Returns true if this map contains no key-value mappings.
    • isEmpty

      boolean isEmpty()
      Returns true if this map contains no key-value mappings.
    • getAllAsync

      Returns read-only async cursor to all entries from map.
    • getAll

      AsyncCursor<Map.Entry<K,V>> getAll()
      Returns read-only cursor to all entries from map.
    • clearAsync

      CompletableFuture<Void> clearAsync()
      Removes all of the mappings from this map. The map will be empty after this call returns.
    • clear

      void clear()
      Removes all of the mappings from this map. The map will be empty after this call returns.