java.lang.Object
com.tlcsdm.core.concurrent.WeakConcurrentSet<V>
A thread-safe set with weak values. Entries are based on a key's system hash code and keys are considered equal only by reference equality.
This class does not implement theSet interface because this implementation is incompatible
with the set contract. While iterating over a set's entries, any value that has not passed iteration is referenced non-weakly.- 作者:
- unknowIfGuestInDream
-
字段详细资料
-
target
-
-
构造器详细资料
-
WeakConcurrentSet
-
-
方法详细资料
-
add
- 参数:
value- The value to add to the set.- 返回:
trueif the value was added to the set and was not contained before.
-
contains
- 参数:
value- The value to check if it is contained in the set.- 返回:
trueif the set contains the value.
-
remove
- 参数:
value- The value to remove from the set.- 返回:
trueif the value is contained in the set.
-
clear
public void clear()Clears the set. -
approximateSize
public int approximateSize()Returns the approximate size of this set where the returned number is at least as big as the actual number of entries.- 返回:
- The minimum size of this set.
-
run
public void run() -
expungeStaleEntries
public void expungeStaleEntries()Cleans all unused references. -
getCleanerThread
- 返回:
- The cleaner thread or
nullif no such thread was set.
-
iterator
-
toString
-