Class ConcurrentHashSet<E>

java.lang.Object
org.jppf.utils.collections.ConcurrentHashSet<E>
Type Parameters:
E - the type of objects in the set.
All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>

public class ConcurrentHashSet<E> extends Object implements Set<E>
A concurrent set implementation backed by a ConcurrentHashMap.
Author:
Laurent Cohen
  • Constructor Details

    • ConcurrentHashSet

      public ConcurrentHashSet()
      Create a new, empty set with a default initial capacity of 16, a load factor of 0.75 and a concurrency level of 16.
    • ConcurrentHashSet

      public ConcurrentHashSet(int initialCapacity)
      Create a new, empty set with the specified initial capacity, a load factor of 0.75 and a concurrency level of 16
      Parameters:
      initialCapacity - the initial capacity.
    • ConcurrentHashSet

      public ConcurrentHashSet(int initialCapacity, float loadFactor)
      Create a new, empty set with the specified initial capacity, load factor and a concurrency level of 16.
      Parameters:
      initialCapacity - the initial capacity.
      loadFactor - the load factor threshold, used to control resizing.
    • ConcurrentHashSet

      public ConcurrentHashSet(int initialCapacity, float loadFactor, int concurrencyLevel)
      Create a new, empty map with the specified initial capacity, load factor and concurrency level.
      Parameters:
      initialCapacity - the initial capacity.
      loadFactor - the load factor threshold, used to control resizing.
      concurrencyLevel - the estimated number of concurrently updating threads.
  • Method Details