Top Description Inners Fields Constructors Methods
io.netty5.buffer.internal

public abstract Class LifecycleTracer

extends Object
Class Inheritance
Known Direct Subclasses
io.netty5.buffer.internal.LifecycleTracer.NoOpTracer, io.netty5.buffer.internal.LifecycleTracer.StackTracer
Annotations
@UnstableApi
Imports
io.netty5.buffer.Buffer, .LeakInfo, .LeakInfo.TracePoint, .Owned, io.netty5.util.Resource, io.netty5.util.internal.SystemPropertyUtil, .UnstableApi, java.util.ArrayDeque, .Collection, .Collections, .Set, java.util.function.Function, java.util.stream.Stream

Instances of this class record life cycle events of resources, to help debug life-cycle errors.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum
private static class
private static class
pack-priv static class
private static class
private static enum

Field Summary

Modifier and TypeField and Description
pack-priv static final boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract void
acquire(int
The new current number of acquires on the traced object.
acquires
)

Add to the trace log that the object has been acquired, in other words the reference count has been incremented.

public abstract void
allocate()

Add to the trace log that the object has been allocated.

public abstract <
The concrete exception type.
E extends Throwable
>
E

Returns:

The same exception instance, that can then be thrown.
attachTrace
(E
The exception that will receive the trace log in the form of suppressed exceptions.
throwable
)

Attach a life cycle trace log to the given exception.

public abstract void
close(int
The new current number of acquires on the traced object.
acquires
)

Add to the trace log that the object has been closed, in other words, the reference count has been decremented.

public abstract Collection<LeakInfo.TracePoint>

Returns:

A collection of trace points.
collectTraces
()

Return the life-cycle trace as an ordered Collection of TracePoints.

public abstract void
drop(int
The new current number of acquires on the traced object.
acquires
)

Add to the trace log that the object has been dropped.

public static LifecycleTracer

Returns:

A new tracer for a resource.
get
()

Get a tracer for a newly allocated resource.

public abstract <
The resource interface for the object.
I extends Resource<I>
,
The concrete type of the object.
T extends ResourceSupport<I, T>
>
Owned<T>

Returns:

An Owned instance that may trace the reception of the object.
send
(Owned<T>
The owned instance being sent.
instance
)

Add to the trace log that the object is being sent.

public abstract void
splitTo(LifecycleTracer
The tracer for the life-cycle that was branched from the life-cycle represented by this tracer.
splitTracer
)

Attach a trace to both life-cycles, that a single life-cycle has been split into two.

public abstract void
touch(Object
The hint object to attach to the trace log.
hint
)

Add the hint object to the trace log.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait