public interface ReferenceOwner
ReferenceCounted resource.
A ReferenceOwner is often passed to
ReferenceCounted.reserve(ReferenceOwner) and later to
ReferenceCounted.release(ReferenceOwner). It enables tools such as
BackgroundResourceReleaser to identify which owner failed to release
its reservation.
| Modifier and Type | Field and Description |
|---|---|
static ReferenceOwner |
INIT
A predefined
ReferenceOwner instance representing an initial reference. |
static ReferenceOwner |
TMP
A predefined
ReferenceOwner instance representing a temporary reference. |
| Modifier and Type | Method and Description |
|---|---|
default int |
referenceId()
Returns a unique identifier (ID) for this reference owner.
|
default String |
referenceName()
Returns a human-readable name for this reference owner.
|
static ReferenceOwner |
temporary(String name)
Creates and returns a temporary with the given name.
|
static final ReferenceOwner INIT
ReferenceOwner instance representing an initial reference.
This instance is intended to be used as the first owner when none is provided.static final ReferenceOwner TMP
ReferenceOwner instance representing a temporary reference.
This can be used as a placeholder owner for temporary references, typically those which
do not have a clearly defined long-term owner.static ReferenceOwner temporary(String name)
When resource tracing is enabled, a new VanillaReferenceOwner is created with the specified name.
Otherwise, the predefined TMP instance is returned, regardless of the provided name.
name - The name to be assigned to the temporary reference owner, used for identification and debugging purposes.default int referenceId()
The default implementation uses the identity hash code of this reference owner instance as the ID.
default String referenceName()
The default implementation generates a name using the simple class name of the reference owner, followed by '@', and then the reference ID encoded in base 36.
Copyright © 2026 Chronicle Software Ltd. All rights reserved.