org.jsr166

## Enum ConcurrentLinkedHashMap.QueuePolicy

- java.lang.Object
- - java.lang.Enum<ConcurrentLinkedHashMap.QueuePolicy>
  - - org.jsr166.ConcurrentLinkedHashMap.QueuePolicy

All Implemented Interfaces:
  Serializable, Comparable<ConcurrentLinkedHashMap.QueuePolicy>

Enclosing class:
  ConcurrentLinkedHashMap<K,V>

    public static enum ConcurrentLinkedHashMap.QueuePolicy
    extends Enum<ConcurrentLinkedHashMap.QueuePolicy>

Defines queue policy for this hash map.

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`PER_SEGMENT_Q` Instance of `ArrayDeque` is created for each segment.
`PER_SEGMENT_Q_OPTIMIZED_RMV` Instance of `GridConcurrentLinkedDequeue` is created for each segment.
`SINGLE_Q` Default policy.

### Method Summary

Methods
`static ConcurrentLinkedHashMap.QueuePolicy` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static ConcurrentLinkedHashMap.QueuePolicy[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

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

### Enum Constant Detail

#### SINGLE_Q

    public static final ConcurrentLinkedHashMap.QueuePolicy SINGLE_Q

Default policy. Single queue is maintained. Iteration order is preserved.

#### PER_SEGMENT_Q

    public static final ConcurrentLinkedHashMap.QueuePolicy PER_SEGMENT_Q

Instance of `ArrayDeque` is created for each segment. This gives the fastest "natural" evicts for bounded maps.

NOTE: Remove operations on map are slower than with other policies.

NOTE: Iteration order is not preserved, i.e. iteration goes as if it was ordinary hash map.

#### PER_SEGMENT_Q_OPTIMIZED_RMV

    public static final ConcurrentLinkedHashMap.QueuePolicy PER_SEGMENT_Q_OPTIMIZED_RMV

Instance of `GridConcurrentLinkedDequeue` is created for each segment. This gives faster "natural" evicts for bounded queues and better remove operation times.

NOTE: Iteration order is not preserved, i.e. iteration goes as if it was ordinary hash map.

### Method Detail

#### values

    public static ConcurrentLinkedHashMap.QueuePolicy[] values()

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

    for (ConcurrentLinkedHashMap.QueuePolicy c : ConcurrentLinkedHashMap.QueuePolicy.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static ConcurrentLinkedHashMap.QueuePolicy valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum type has no constant with the specified name
  `NullPointerException` - if the argument is null

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.5.0-b1
Release Date | : December 1 2015