public enum ReferenceType
extends Enum
Supported reference implementations for managed references.
| Enum constant | Description |
|---|---|
HARD |
Stores referents strongly until cleared explicitly. |
PHANTOM |
Stores referents as phantom references for post-mortem cleanup only. |
SOFT |
Stores referents as softly reachable values that may be cleared under memory pressure. |
WEAK |
Stores referents as weakly reachable values that may be cleared once weakly reachable. |
| Type Params | Return Type | Name and description |
|---|---|---|
<T, V extends Finalizable> |
protected abstract Reference<T, V> |
createReference(T value, V handler, ReferenceQueue queue)Creates a reference of this type for the supplied referent and handler. |
Stores referents strongly until cleared explicitly.
Stores referents as phantom references for post-mortem cleanup only.
Stores referents as softly reachable values that may be cleared under memory pressure.
Stores referents as weakly reachable values that may be cleared once weakly reachable.
Creates a reference of this type for the supplied referent and handler.
value - the referent to wraphandler - the cleanup handler associated with the referencequeue - the queue to notify for queue-backed referencesT - the referent typeV - the handler typeCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.