| Package | Description |
|---|---|
| net.openhft.chronicle.core.io |
The resource management package provides classes and interfaces for managing the lifecycle of
resources such as files, streams, and memory buffers.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
MonitorReferenceCounted
This interface extends
ReferenceCountedTracer and provides methods for monitoring the reference counted object. |
interface |
ReferenceCounted
Represents a resource that is reference counted.
|
interface |
ReferenceCountedTracer
An interface for monitoring and tracing the reference counting of objects.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractCloseable
An abstract class that represents a closeable resource with additional utilities for managing the resource lifecycle.
|
class |
AbstractCloseableReferenceCounted
Represents a closeable resource with reference counting capabilities.
|
class |
AbstractReferenceCounted
Abstract base class for managing reference-counted resources.
|
class |
SimpleCloseable
An abstract class providing a basic implementation of the
Closeable, ReferenceOwner, and ManagedCloseable interfaces. |
class |
TracingReferenceCounted |
class |
UnsafeCloseable
An abstract base class for resources that use the
Unsafe class for low-level memory operations. |
class |
VanillaReferenceCounted
This class provides a basic implementation of the
MonitorReferenceCounted interface. |
class |
VanillaReferenceOwner
A simple implementation of the
ReferenceOwner and QueryCloseable interfaces. |
| Modifier and Type | Field and Description |
|---|---|
static ReferenceOwner |
ReferenceOwner.INIT
A predefined
ReferenceOwner instance representing an initial reference. |
static ReferenceOwner |
ReferenceOwner.TMP
A predefined
ReferenceOwner instance representing a temporary reference. |
| Modifier and Type | Method and Description |
|---|---|
static ReferenceOwner |
ReferenceOwner.temporary(String name)
Creates and returns a temporary with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
ReferenceChangeListener.onReferenceAdded(ReferenceCounted referenceCounted,
ReferenceOwner referenceOwner)
Called when a reference is added to a
ReferenceCounted object. |
default void |
ReferenceChangeListener.onReferenceRemoved(@Nullable ReferenceCounted referenceCounted,
ReferenceOwner referenceOwner)
Called when a reference is removed from a
ReferenceCounted object. |
default void |
ReferenceChangeListener.onReferenceTransferred(ReferenceCounted referenceCounted,
ReferenceOwner fromOwner,
ReferenceOwner toOwner)
Called when a reference is transferred from one owner to another for a
ReferenceCounted object. |
void |
TracingReferenceCounted.release(ReferenceOwner id) |
void |
AbstractCloseableReferenceCounted.release(ReferenceOwner id)
Releases the resource for the given id.
|
void |
AbstractReferenceCounted.release(ReferenceOwner id)
Decrements the reference count by one.
|
void |
VanillaReferenceCounted.release(ReferenceOwner id)
Releases the resource reserved by the provided reference owner.
|
void |
ReferenceCounted.release(ReferenceOwner id)
Releases the resource by decrementing its reference count by one.
|
void |
TracingReferenceCounted.releaseLast(ReferenceOwner id) |
void |
AbstractCloseableReferenceCounted.releaseLast(ReferenceOwner id)
Releases the resource for the given id and checks the resource is now released.
|
void |
AbstractReferenceCounted.releaseLast(ReferenceOwner id)
Releases the last reference to the resource.
|
void |
VanillaReferenceCounted.releaseLast(ReferenceOwner id)
Releases the last reference of the resource.
|
void |
ReferenceCounted.releaseLast(ReferenceOwner id)
Releases the resource and ensures that this release is the last usage of the resource.
|
void |
TracingReferenceCounted.reserve(ReferenceOwner id) |
void |
AbstractCloseableReferenceCounted.reserve(ReferenceOwner id)
Attempts to reserve the resource for the given unique id.
|
void |
AbstractReferenceCounted.reserve(ReferenceOwner id)
Increments the reference count by one, indicating that the resource is now shared among multiple owners.
|
void |
VanillaReferenceCounted.reserve(ReferenceOwner id)
Reserves the resource for the provided reference owner.
|
void |
ReferenceCounted.reserve(ReferenceOwner id)
Reserves the resource by incrementing its reference count by one.
|
void |
TracingReferenceCounted.reserveTransfer(ReferenceOwner from,
ReferenceOwner to) |
void |
AbstractCloseableReferenceCounted.reserveTransfer(ReferenceOwner from,
ReferenceOwner to)
Reserves the resource for the given id.
|
void |
AbstractReferenceCounted.reserveTransfer(ReferenceOwner from,
ReferenceOwner to)
Transfers a reference from one owner to another.
|
void |
VanillaReferenceCounted.reserveTransfer(ReferenceOwner from,
ReferenceOwner to)
Transfers the reservation of the resource from one reference owner to another.
|
default void |
ReferenceCounted.reserveTransfer(ReferenceOwner from,
ReferenceOwner to)
Atomically transfers a reservation from one owner to another by incrementing the reference
count for the new owner and decrementing it for the old owner.
|
boolean |
TracingReferenceCounted.tryReserve(ReferenceOwner id) |
boolean |
AbstractCloseableReferenceCounted.tryReserve(ReferenceOwner id)
Tries to reserve the resource for the given id.
|
boolean |
AbstractReferenceCounted.tryReserve(ReferenceOwner id)
Attempts to reserve the resource without throwing an exception if it is already released.
|
boolean |
VanillaReferenceCounted.tryReserve(ReferenceOwner id)
Attempts to reserve the resource for the provided reference owner.
|
boolean |
ReferenceCounted.tryReserve(ReferenceOwner id)
Attempts to reserve the resource and returns
true if successful. |
Copyright © 2024. All rights reserved.