Class BmSegmentSyncMap<P,​T>


  • @Deprecated
    public class BmSegmentSyncMap<P,​T>
    extends Object
    Deprecated.
    A map with segment synchronization. Implementation limited only for put/get/remove operations. Iterations are not supported.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected long hashSalt
      Deprecated.
      Hash salt value
    • Constructor Summary

      Constructors 
      Constructor Description
      BmSegmentSyncMap​(int segments)
      Deprecated.
      Constructs a new instance.
    • Field Detail

      • hashSalt

        protected final long hashSalt
        Deprecated.
        Hash salt value
    • Constructor Detail

      • BmSegmentSyncMap

        public BmSegmentSyncMap​(int segments)
        Deprecated.
        Constructs a new instance.
        Parameters:
        segments - The segment count.
    • Method Detail

      • clear

        public void clear()
        Deprecated.
        Clears map.
      • getMap

        public Map<P,​T> getMap​(P key)
        Deprecated.
        Gets underlying segment map by key.
        Parameters:
        key - The key.
        Returns:
        the underlying segment map, never null.
      • get

        public T get​(P key)
        Deprecated.
        Gets the value of the mapping with the specified key.
        Parameters:
        key - the key.
        Returns:
        the value of the mapping with the specified key, or null if no mapping for the specified key is found.
      • put

        public T put​(P key,
                     T value)
        Deprecated.
        Maps the specified key to the specified value.
        Parameters:
        key - the key.
        value - the value.
        Returns:
        the value of the previous mapping with the specified key or null if there was no such mapping.
      • putAll

        public void putAll​(Map<P,​T> map)
        Deprecated.
        Copies all of the mappings from the specified map to this map.
        Parameters:
        map - the map to copy mappings from, may not be null.
      • remove

        public T remove​(P key)
        Deprecated.
        Removes the mapping with the specified key from this map.
        Parameters:
        key - the key of the mapping to remove.
        Returns:
        the value of the removed mapping or null if no mapping for the specified key was found.
      • containsKey

        public boolean containsKey​(P key)
        Deprecated.
        Checks if the map contains the specified key.
        Parameters:
        key - the key to check.
        Returns:
        true if the map contains the specified key, false otherwise.
      • copyKeys

        public List<P> copyKeys()
        Deprecated.
        Copies keys.
        Returns:
        a list containing all the keys contained in this map, never null.
      • size

        public int size()
        Deprecated.
        Returns the number of elements in this map.
        Returns:
        the number of elements in this map.
      • asMap

        public Map<P,​T> asMap()
        Deprecated.
        Creates a copy of this map.
        Returns:
        a Map containing all the mapping this map contains, never null.
      • getSegments

        public Map<P,​T>[] getSegments()
        Deprecated.
        Gets underlying segment maps.
        Returns:
        the underlying segment maps, never null.
      • hashSaltValue

        protected long hashSaltValue()
        Deprecated.
        Gets hash salt value.
        Returns:
        hash salt value.