Package ghidra.util.datastruct
Class WeakDataStructureFactory
java.lang.Object
ghidra.util.datastruct.WeakDataStructureFactory
Factory for creating containers to use in various threading environments
Other non-weak listeners:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> WeakSet<T>
Use when mutations outweigh iterations.static <T> WeakSet<T>
Use when iterations outweigh mutations.static <T> WeakSet<T>
Use when all access are on a single thread, such as the Swing thread.static <T> WeakSet<T>
Use to signal that the returned weak set is not thread safe and must be protected accordingly when used in a multi-threaded environment.
-
Constructor Details
-
WeakDataStructureFactory
public WeakDataStructureFactory()
-
-
Method Details
-
createSingleThreadAccessWeakSet
Use when all access are on a single thread, such as the Swing thread.- Returns:
- a new WeakSet
-
createThreadUnsafeWeakSet
Use to signal that the returned weak set is not thread safe and must be protected accordingly when used in a multi-threaded environment.- Returns:
- a new WeakSet
-
createCopyOnReadWeakSet
Use when mutations outweigh iterations.- Returns:
- a new WeakSet
- See Also:
-
CopyOnReadWeakSet
-
createCopyOnWriteWeakSet
Use when iterations outweigh mutations.- Returns:
- a new WeakSet
- See Also:
-
CopyOnWriteWeakSet
-