All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.fix.stdlib.reference.CleanableWeakReference Maven / Gradle / Ivy

There is a newer version: 3.1.4
Show newest version
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