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<Void> 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.
      Parameters:
      key - Key with which the specified value is to be associated.
      value - Value to be associated with the specified key.
    • put

      void 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.
      Parameters:
      key - Key with which the specified value is to be associated.
      value - Value to be associated with the specified key.
    • getAndPutAsync

      CompletableFuture<V> getAndPutAsync(K key, V value)
      Associates the specified value with the specified key in this map and returns the previous value. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
      Parameters:
      key - Key with which the specified value is to be associated.
      value - Value to be associated with the specified key.
      Returns:
      the previous value associated with key, or null if there was no mapping for key.
    • getAndPut

      @Nullable V getAndPut(K key, V value)
      Associates the specified value with the specified key in this map and returns the previous value. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
      Parameters:
      key - Key with which the specified value is to be associated.
      value - Value to be associated with the specified key.
      Returns:
      the previous value associated with key, or null if there was no mapping for key.
    • removeAsync

      CompletableFuture<Boolean> removeAsync(K key)
      Removes the mapping for a key from this map if it is present.
      Parameters:
      key - Key whose mapping is to be removed from the map.
      Returns:
      true if the key was removed, false if the map contained no mapping for the key.
    • remove

      boolean remove(K key)
      Removes the mapping for a key from this map if it is present.
      Parameters:
      key - Key whose mapping is to be removed from the map.
      Returns:
      true if the key was removed, false if the map contained no mapping for the key.
    • getAndRemoveAsync

      CompletableFuture<V> getAndRemoveAsync(K key)
      Removes the mapping for a key from this map if it is present and returns the previous value.
      Parameters:
      key - Key whose mapping is to be removed from the map.
      Returns:
      the value to which this map previously associated the key, or null if the map contained no mapping for the key.
    • getAndRemove

      @Nullable V getAndRemove(K key)
      Removes the mapping for a key from this map if it is present and returns the previous value.
      Parameters:
      key - Key whose mapping is to be removed from the map.
      Returns:
      the value to which this map previously associated the key, or null if the map contained no mapping for the key.
    • removeAllAsync

      CompletableFuture<Void> removeAllAsync(Collection<K> keys)
      Removes all mappings for the specified keys from this map.
      Parameters:
      keys - Keys whose mappings are to be removed from the map.
    • removeAll

      void removeAll(Collection<K> keys)
      Removes all mappings for the specified keys from this map.
      Parameters:
      keys - Keys whose mappings are to be removed from the map.
    • 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.
    • destroyAsync

      CompletableFuture<Void> destroyAsync()
      Destroys this map, removing all data and the map definition. After this operation, the map can no longer be used.
    • destroy

      void destroy()
      Destroys this map, removing all data and the map definition. After this operation, the map can no longer be used.