|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.lib.util.concurrent.ConcurrentReferenceHashSet<E>
public class ConcurrentReferenceHashSet<E>
A concurrent set whose values may be stored as weak or soft references. If
the constructor is invoked with refType
set to HARD
,
this uses a JDK1.5 ConcurrentHashMap
under the covers. Otherwise,
it uses a ConcurrentReferenceHashMap
.
Field Summary | |
---|---|
static int |
HARD
Hard reference marker. |
static int |
SOFT
Soft reference marker. |
static int |
WEAK
Weak reference marker. |
Constructor Summary | |
---|---|
ConcurrentReferenceHashSet(int refType)
Construct a set with the given reference type. |
Method Summary | ||
---|---|---|
boolean |
add(E obj)
|
|
boolean |
addAll(Collection<? extends E> coll)
|
|
void |
clear()
|
|
boolean |
contains(Object obj)
|
|
boolean |
containsAll(Collection<?> coll)
|
|
boolean |
equals(Object obj)
|
|
int |
hashCode()
|
|
boolean |
isEmpty()
|
|
Iterator<E> |
iterator()
|
|
boolean |
remove(Object obj)
|
|
boolean |
removeAll(Collection<?> coll)
|
|
boolean |
retainAll(Collection<?> coll)
|
|
int |
size()
|
|
Object[] |
toArray()
|
|
|
toArray(T[] arr)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int HARD
public static final int SOFT
public static final int WEAK
Constructor Detail |
---|
public ConcurrentReferenceHashSet(int refType)
Method Detail |
---|
public boolean add(E obj)
add
in interface Collection<E>
add
in interface Set<E>
public boolean addAll(Collection<? extends E> coll)
addAll
in interface Collection<E>
addAll
in interface Set<E>
public void clear()
clear
in interface Collection<E>
clear
in interface Set<E>
public boolean contains(Object obj)
contains
in interface Collection<E>
contains
in interface Set<E>
public boolean containsAll(Collection<?> coll)
containsAll
in interface Collection<E>
containsAll
in interface Set<E>
public boolean isEmpty()
isEmpty
in interface Collection<E>
isEmpty
in interface Set<E>
public Iterator<E> iterator()
iterator
in interface Iterable<E>
iterator
in interface Collection<E>
iterator
in interface Set<E>
public boolean remove(Object obj)
remove
in interface Collection<E>
remove
in interface Set<E>
public boolean removeAll(Collection<?> coll)
removeAll
in interface Collection<E>
removeAll
in interface Set<E>
public boolean retainAll(Collection<?> coll)
retainAll
in interface Collection<E>
retainAll
in interface Set<E>
public int size()
size
in interface Collection<E>
size
in interface Set<E>
public Object[] toArray()
toArray
in interface Collection<E>
toArray
in interface Set<E>
public <T> T[] toArray(T[] arr)
toArray
in interface Collection<E>
toArray
in interface Set<E>
public int hashCode()
hashCode
in interface Collection<E>
hashCode
in interface Set<E>
hashCode
in class Object
public boolean equals(Object obj)
equals
in interface Collection<E>
equals
in interface Set<E>
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |