saker.build Documentation TaskDoc JavaDoc Packages
public class ReferencePolicy
Utility class for creating weak or soft references based on the configuration of this JVM.

The created reference types can be configured using PropertyNames.PROPERTY_SAKER_REFERENCE_POLICY.

Nested types
public enum
Enumeration of possible reference policy implementations.
Methods
public static <T> Reference<T>
createReference(T referent)
Creates a reference object for the given referent.
public static <T> Reference<T>
createReference(T referent, ReferenceQueue<super T> queue)
Creates a reference object for the given referent and reference queue.
public static <T> Reference<T> createReference(T referent)
Creates a reference object for the given referent.
TThe type of the referent.
referentThe referent.
The created reference.
public static <T> Reference<T> createReference(T referent, ReferenceQueue<super T> queue)
Creates a reference object for the given referent and reference queue.
TThe type of the referent.
referentThe referent.
queueThe reference queue.
The created reference.