Top Description Inners Methods
io.netty5.buffer

public Interface LeakInfo

extends Iterable<LeakInfo.TracePoint>
Known Direct Implementers
io.netty5.buffer.internal.LeakDetection.InternalLeakInfo
Annotations
@UnstableApi
Imports
io.netty5.buffer.LeakInfo.TracePoint, io.netty5.util.Resource, io.netty5.util.internal.UnstableApi, java.util.function.Consumer, java.util.stream.Stream

Information about a resource leak that happened. This information is provided to callbacks of the MemoryManager#onLeakDetected(Consumer) method.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
LeakInfo.TracePoint

A moment in the life of the leaked object, for which some information was recorded.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

A description of the leaked object.
objectDescription
()

A human-readable description of the object that leaked.

public Stream<LeakInfo.TracePoint>

Returns:

A Stream of TracePoints, covering the life-cycle of the leaked resource.
stream
()

Create a Stream of all the TracePoints in this LeakInfo.

Inherited from java.lang.Iterable:
forEachiteratorspliterator

Method Detail

objectDescriptionback to summary
public String objectDescription()

A human-readable description of the object that leaked.

Returns:String

A description of the leaked object.

streamback to summary
public Stream<LeakInfo.TracePoint> stream()

Create a Stream of all the TracePoints in this LeakInfo. The returned Stream does not need to be closed.

Returns:Stream<LeakInfo.TracePoint>

A Stream of TracePoints, covering the life-cycle of the leaked resource.

io.netty5.buffer back to summary

public Interface LeakInfo.TracePoint

Known Direct Implementers
io.netty5.buffer.internal.LifecycleTracer.Trace

A moment in the life of the leaked object, for which some information was recorded.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

A hint object, if there is any on this trace point, otherwise null.
hint
()

Get the hint object from a touch call, if any.

public Throwable

Returns:

A Throwable with the stack trace of this trace point.
traceback
()

Get a Throwable instance that holds the recorded stack trace of this trace point.

Method Detail

hintback to summary
public Object hint()

Get the hint object from a touch call, if any. If this trace point is not a touch call, or if the hint argument was null, then null will be returned.

Returns:Object

A hint object, if there is any on this trace point, otherwise null.

tracebackback to summary
public Throwable traceback()

Get a Throwable instance that holds the recorded stack trace of this trace point.

Returns:Throwable

A Throwable with the stack trace of this trace point.