org.apache.ignite.internal.util

## Class GridBoundedConcurrentLinkedHashMap<K,V>

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - org.jsr166.ConcurrentLinkedHashMap<K,V>
    - - org.apache.ignite.internal.util.GridBoundedConcurrentLinkedHashMap<K,V>

Type Parameters:
  `K` - Map key.
  `V` - Map entry.

All Implemented Interfaces:
  ConcurrentMap<K,V>, Map<K,V>

    public class GridBoundedConcurrentLinkedHashMap<K,V>
    extends ConcurrentLinkedHashMap<K,V>

Concurrent map with an upper bound. Once map reaches its maximum capacity, the eldest elements will be removed based on insertion order.

### Nested Class Summary

### Nested classes/interfaces inherited from class org.jsr166.ConcurrentLinkedHashMap

`ConcurrentLinkedHashMap.HashEntry<K,V>, ConcurrentLinkedHashMap.QueuePolicy`

### Nested classes/interfaces inherited from class java.util.AbstractMap

`AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

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

`Map.Entry<K,V>`

### Field Summary

### Fields inherited from class org.jsr166.ConcurrentLinkedHashMap

`DFLT_CONCUR_LVL, DFLT_INIT_CAP, DFLT_LOAD_FACTOR, MAX_CAP_LIMIT, MAX_SEGS, RETRIES_BEFORE_LOCK`

### Constructor Summary

Constructors
Constructor and Description
`GridBoundedConcurrentLinkedHashMap(int max)` Creates a new, empty map with a default initial capacity (16), load factor (0.75) and concurrencyLevel (16).
`GridBoundedConcurrentLinkedHashMap(int max, int initCap)` Creates a new, empty map with the specified initial capacity, and with default load factor (0.75) and concurrencyLevel (16).
`GridBoundedConcurrentLinkedHashMap(int max, int initCap, float loadFactor)` Creates a new, empty map with the specified initial capacity and load factor and with the default concurrencyLevel (16).
`GridBoundedConcurrentLinkedHashMap(int max, int initCap, float loadFactor, int concurLvl)` Creates a new, empty map with the specified initial capacity, load factor and concurrency level.
`GridBoundedConcurrentLinkedHashMap(int max, int initCap, float loadFactor, int concurLvl, ConcurrentLinkedHashMap.QueuePolicy qPlc)` Creates a new, empty map with the specified initial capacity, load factor and concurrency level.

### Method Summary

Methods
`String` `toString()`

### Methods inherited from class org.jsr166.ConcurrentLinkedHashMap

`clear, contains, containsKey, containsValue, descendingElements, descendingEntrySet, descendingKeys, descendingKeySet, descendingValues, elements, entrySet, get, getSafe, isEmpty, isEmptyx, keys, keySet, policy, put, putAll, putIfAbsent, queue, remove, remove, replace, replace, replacex, size, sizex, values`

### Methods inherited from class java.util.AbstractMap

`clone, equals, hashCode`

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.util.Map

`equals, hashCode`

### Constructor Detail

#### GridBoundedConcurrentLinkedHashMap

    public GridBoundedConcurrentLinkedHashMap(int max)

Creates a new, empty map with a default initial capacity (16), load factor (0.75) and concurrencyLevel (16).

Parameters:
  `max` - Upper bound of this map.

#### GridBoundedConcurrentLinkedHashMap

    public GridBoundedConcurrentLinkedHashMap(int max,
                                      int initCap)

Creates a new, empty map with the specified initial capacity, and with default load factor (0.75) and concurrencyLevel (16).

Parameters:
  `max` - Upper bound of this map.
  `initCap` - the initial capacity. The implementation performs internal sizing to accommodate this many elements.
Throws:
  `IllegalArgumentException` - if the initial capacity of elements is negative.

#### GridBoundedConcurrentLinkedHashMap

    public GridBoundedConcurrentLinkedHashMap(int max,
                                      int initCap,
                                      float loadFactor)

Creates a new, empty map with the specified initial capacity and load factor and with the default concurrencyLevel (16).

Parameters:
  `max` - Upper bound of this map.
  `initCap` - The implementation performs internal sizing to accommodate this many elements.
  `loadFactor` - the load factor threshold, used to control resizing. Resizing may be performed when the average number of elements per bin exceeds this threshold.
Throws:
  `IllegalArgumentException` - if the initial capacity of elements is negative or the load factor is nonpositive.

#### GridBoundedConcurrentLinkedHashMap

    public GridBoundedConcurrentLinkedHashMap(int max,
                                      int initCap,
                                      float loadFactor,
                                      int concurLvl)

Creates a new, empty map with the specified initial capacity, load factor and concurrency level.

Parameters:
  `max` - Upper bound of this map.
  `initCap` - the initial capacity. The implementation performs internal sizing to accommodate this many elements.
  `loadFactor` - the load factor threshold, used to control resizing. Resizing may be performed when the average number of elements per bin exceeds this threshold.
  `concurLvl` - the estimated number of concurrently updating threads. The implementation performs internal sizing to try to accommodate this many threads.
Throws:
  `IllegalArgumentException` - if the initial capacity is negative or the load factor or concurLvl are nonpositive.

#### GridBoundedConcurrentLinkedHashMap

    public GridBoundedConcurrentLinkedHashMap(int max,
                                      int initCap,
                                      float loadFactor,
                                      int concurLvl,
                                      ConcurrentLinkedHashMap.QueuePolicy qPlc)

Creates a new, empty map with the specified initial capacity, load factor and concurrency level.

Parameters:
  `max` - Upper bound of this map.
  `initCap` - the initial capacity. The implementation performs internal sizing to accommodate this many elements.
  `loadFactor` - the load factor threshold, used to control resizing. Resizing may be performed when the average number of elements per bin exceeds this threshold.
  `concurLvl` - the estimated number of concurrently updating threads. The implementation performs internal sizing to try to accommodate this many threads.
  `qPlc` - Queue policy.
Throws:
  `IllegalArgumentException` - if the initial capacity is negative or the load factor or concurLvl are nonpositive.

### Method Detail

#### toString

    public String toString()

Overrides:
  `toString` in class `AbstractMap<K,V>`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.8.0
Release Date | : December 5 2016