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 AbstractConcurrentSet
AbstractConcurrentSet.Entry<T> -
Field Summary
Fields inherited from class 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 AbstractConcurrentSet
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArrayMethods 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
-
WeakConcurrentSet
public WeakConcurrentSet()
-
-
Method Details
-
iterator
-
createEntry
- Specified by:
createEntryin classAbstractConcurrentSet<T>
-