Class GridLeanMap<K,​V>

    • Constructor Detail

      • GridLeanMap

        public GridLeanMap()
        Constructs lean map with initial size of 3.
      • GridLeanMap

        public GridLeanMap​(int size)
        Constructs lean map with initial size.

        If given size is greater than zero then map activates batch mode for put() operations. In this mode map allows to put up to size number of key-value pairs without internal size optimization, i.e. each next put() in batch doesn't switch backing implementation so that initial implementation is used as long as its capacity allows.

        Note that any removal operation either through iterator or map itself turns batch mode off and map starts optimizing size after any modification.

        Parameters:
        size - Initial size.
      • GridLeanMap

        public GridLeanMap​(Map<K,​V> m)
        Constructs lean map.
        Parameters:
        m - Map to copy entries from.