Class CleanerReference<T,​A>

  • All Implemented Interfaces:
    Reference<T,​A>

    public class CleanerReference<T,​A>
    extends PhantomReference<T,​A>
    A special version of PhantomReference that is strongly retained until it is reaped by the collection thread.
    • Constructor Detail

      • CleanerReference

        public CleanerReference​(T referent,
                                A attachment,
                                Reaper<T,​A> reaper)
        Construct a new instance with a reaper.
        Parameters:
        referent - the referent
        attachment - the attachment
        reaper - the reaper to use
    • Method Detail

      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object