|
||||||||||
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
public class ConcurrentReferenceHashSet
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(Object obj)
|
boolean |
addAll(Collection coll)
|
void |
clear()
|
boolean |
contains(Object obj)
|
boolean |
containsAll(Collection coll)
|
boolean |
equals(Object obj)
|
int |
hashCode()
|
boolean |
isEmpty()
|
Iterator |
iterator()
|
boolean |
remove(Object obj)
|
boolean |
removeAll(Collection coll)
|
boolean |
retainAll(Collection coll)
|
int |
size()
|
Object[] |
toArray()
|
Object[] |
toArray(Object[] 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(Object obj)
add
in interface Collection
add
in interface Set
public boolean addAll(Collection coll)
addAll
in interface Collection
addAll
in interface Set
public void clear()
clear
in interface Collection
clear
in interface Set
public boolean contains(Object obj)
contains
in interface Collection
contains
in interface Set
public boolean containsAll(Collection coll)
containsAll
in interface Collection
containsAll
in interface Set
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface Set
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
iterator
in interface Set
public boolean remove(Object obj)
remove
in interface Collection
remove
in interface Set
public boolean removeAll(Collection coll)
removeAll
in interface Collection
removeAll
in interface Set
public boolean retainAll(Collection coll)
retainAll
in interface Collection
retainAll
in interface Set
public int size()
size
in interface Collection
size
in interface Set
public Object[] toArray()
toArray
in interface Collection
toArray
in interface Set
public Object[] toArray(Object[] arr)
toArray
in interface Collection
toArray
in interface Set
public int hashCode()
hashCode
in interface Collection
hashCode
in interface Set
hashCode
in class Object
public boolean equals(Object obj)
equals
in interface Collection
equals
in interface Set
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |