Package org.jsr166

Enum ConcurrentLinkedHashMap.QueuePolicy

    • Enum Constant Detail

      • 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