ru.fix.stdlib.reference.CleanableWeakReference Maven / Gradle / Ivy
package ru.fix.stdlib.reference;
import java.lang.ref.WeakReference;
/**
* Reference to the referent object.
* Behaves as {@link WeakReference}
*/
public interface CleanableWeakReference{
/**
* @return referent if it steal reachable or null
*/
T get();
/**
* @return true if cleaning order canceled and {@link ReferenceCleaner} will not clean reference.
* false if {@link ReferenceCleaner} already acquired reference for cleaning
* and will invoke cleaning action in nearest future
*/
boolean cancelCleaningOrder();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy