Top Description Inners Fields Constructors Methods
io.netty5.buffer

public final Class LoggingLeakCallback

extends Object
implements Consumer<LeakInfo>
Class Inheritance
All Implemented Interfaces
java.util.function.Consumer
Imports
io.netty5.util.internal.logging.InternalLogger, .InternalLoggerFactory, java.util.function.Consumer

The LoggingLeakCallback can be installed to enable logging output when a leak is detected.

The logging output will be done with the ERROR level.

Note that asynchronous and fast logging should be preferred, since the callback may run inside a cleaner-thread.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final LoggingLeakCallback
private static final InternalLogger

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
accept(LeakInfo
the input argument
leakInfo
)

Implements java.util.function.Consumer.accept.

Performs this operation on the given argument.
public static LoggingLeakCallback

Returns:

An instance of the LoggingLeakCallback class.
getInstance
()

Get an instance of the LoggingLeakCallback.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

instanceback to summary
private static final LoggingLeakCallback instance
loggerback to summary
private static final InternalLogger logger

Constructor Detail

LoggingLeakCallbackback to summary
private LoggingLeakCallback()

Method Detail

acceptback to summary
public void accept(LeakInfo leakInfo)

Implements java.util.function.Consumer.accept.

Doc from java.util.function.Consumer.accept.

Performs this operation on the given argument.

Parameters
leakInfo:LeakInfo

the input argument

Annotations
@Override
getInstanceback to summary
public static LoggingLeakCallback getInstance()

Get an instance of the LoggingLeakCallback.

Returns:LoggingLeakCallback

An instance of the LoggingLeakCallback class.

io.netty5.buffer back to summary

private final Class LoggingLeakCallback.LeakReport

extends Throwable
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static LoggingLeakCallback.LeakReport
Inherited from java.lang.Throwable:
addSuppressedfillInStackTracegetCausegetLocalizedMessagegetMessagegetStackTracegetSuppressedinitCauseprintStackTraceprintStackTraceprintStackTracesetStackTracetoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.Throwable.serialVersionUID.

Constructor Detail

LeakReportback to summary
private LeakReport()

Method Detail

reportForback to summary
pack-priv static LoggingLeakCallback.LeakReport reportFor(LeakInfo info)