Class WeakDataStructureFactory


  • public class WeakDataStructureFactory
    extends java.lang.Object
    Factory for creating containers to use in various threading environments
    • Constructor Detail

      • WeakDataStructureFactory

        public WeakDataStructureFactory()
    • Method Detail

      • createSingleThreadAccessWeakSet

        public static <T> WeakSet<T> createSingleThreadAccessWeakSet()
        Use when all access are on a single thread, such as the Swing thread.
        Returns:
        a new WeakSet
      • createCopyOnReadWeakSet

        public static <T> WeakSet<T> createCopyOnReadWeakSet()
        Use when mutations outweigh iterations.
        Returns:
        a new WeakSet
        See Also:
        CopyOnReadWeakSet
      • createCopyOnWriteWeakSet

        public static <T> WeakSet<T> createCopyOnWriteWeakSet()
        Use when iterations outweigh mutations.
        Returns:
        a new WeakSet
        See Also:
        CopyOnWriteWeakSet