Class ConcurrentReferenceHashSet<E>
java.lang.Object
org.apache.openjpa.lib.util.concurrent.ConcurrentReferenceHashSet<E>
- All Implemented Interfaces:
Serializable, Iterable<E>, Collection<E>, Set<E>
A concurrent set whose values may be stored as weak or soft references. If
the constructor is invoked with
refType set to AbstractReferenceMap.ReferenceStrength.HARD,
this uses a JDK1.5 ConcurrentHashMap under the covers. Otherwise,
it uses a ConcurrentReferenceHashMap.- Author:
- Abe White
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a set with the given reference type. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> coll) voidclear()booleanbooleancontainsAll(Collection<?> coll) booleaninthashCode()booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> coll) booleanretainAll(Collection<?> coll) intsize()Object[]toArray()<T> T[]toArray(T[] arr) Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface Set
spliterator
-
Constructor Details
-
ConcurrentReferenceHashSet
Construct a set with the given reference type.
-
-
Method Details
-
add
-
addAll
-
clear
-
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceSet<E>
-
isEmpty
-
iterator
-
remove
-
removeAll
-
retainAll
-
size
-
toArray
-
toArray
-
hashCode
-
equals
-