Interface DistributedMap<K,​V>

  • Type Parameters:
    K - The type of key is limited to string only.
    V - The type of values in the dictionary.
    All Superinterfaces:
    DistributedDataStructure, java.lang.Iterable, Lockable, java.util.Map<K,​V>, Notifiable

    public interface DistributedMap<K,​V>
    extends java.util.Map<K,​V>, DistributedDataStructure, Notifiable, java.lang.Iterable
    This interface contains methods and parameters for distributed Map.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void copyTo​(java.util.Map.Entry<java.lang.String,​V>[] array, int arrayIndex)
      Copies the Map elements to the specified array, starting at the specified index.
      java.util.Collection<V> get​(java.util.Collection<java.lang.String> keys)
      Returns the values associated with the specified keys.
      void insert​(java.util.Map<java.lang.String,​V> entries)
      Insert elements with the provided keys and values in DistributedMap.
      int remove​(java.util.Collection<java.lang.String> keys)
      Removes the element with the specified keys from DistributedMap.
      • Methods inherited from interface java.lang.Iterable

        forEach, iterator, spliterator
      • Methods inherited from interface com.alachisoft.ncache.client.datastructures.Lockable

        lock, unlock
      • Methods inherited from interface java.util.Map

        clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
    • Method Detail

      • insert

        void insert​(java.util.Map<java.lang.String,​V> entries)
        Insert elements with the provided keys and values in DistributedMap.
        Parameters:
        entries -
      • copyTo

        void copyTo​(java.util.Map.Entry<java.lang.String,​V>[] array,
                    int arrayIndex)
        Copies the Map elements to the specified array, starting at the specified index.
        Parameters:
        array - The destination array of the elements copied from map.
        arrayIndex - he zero-based index in array at which copying begins.
      • remove

        int remove​(java.util.Collection<java.lang.String> keys)
        Removes the element with the specified keys from DistributedMap.
        Parameters:
        keys - The keys of the elements to remove.
        Returns:
        The number of items that were removed.
      • get

        java.util.Collection<V> get​(java.util.Collection<java.lang.String> keys)
        Returns the values associated with the specified keys.
        Parameters:
        keys - The keys whose values to get.
        Returns:
        Collection of values against the provided keys.