Package net.engio.mbassy.common
Class WeakConcurrentSet<T>
java.lang.Object
net.engio.mbassy.common.AbstractConcurrentSet<T>
net.engio.mbassy.common.WeakConcurrentSet<T>
- All Implemented Interfaces:
Iterable<T>
,Collection<T>
,Set<T>
This implementation uses weak references to the elements. Iterators automatically perform cleanups of
garbage collected objects during iteration -> no dedicated maintenance operations need to be called or run in background.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.engio.mbassy.common.AbstractConcurrentSet
AbstractConcurrentSet.Entry<T>
-
Field Summary
Fields inherited from class net.engio.mbassy.common.AbstractConcurrentSet
head, lock
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractConcurrentSet.Entry
<T> createEntry
(T value, AbstractConcurrentSet.Entry<T> next) iterator()
Methods inherited from class net.engio.mbassy.common.AbstractConcurrentSet
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.Set
spliterator
-
Constructor Details
-
WeakConcurrentSet
public WeakConcurrentSet()
-
-
Method Details
-
iterator
-
createEntry
- Specified by:
createEntry
in classAbstractConcurrentSet<T>
-