Top Description Methods
io.netty5.buffer

public Interface Drop<T>

Known Direct Implementers
io.netty5.buffer.SensitiveBufferAllocator.ZeroingDrop, io.netty5.buffer.internal.ArcDrop, io.netty5.buffer.internal.CleanerDrop, io.netty5.buffer.pool.PooledDrop, io.netty5.buffer.unsafe.FreeAddress
Type Parameters
<T>
The type of resource that can be dropped.
Imports
io.netty5.util.Resource

An interface used by Resource instances to implement their resource disposal mechanics. The drop(Object) method will be called by the resource when they are closed.

Method Summary

Modifier and TypeMethod and Description
public void
attach(T
The new Resource instance with the new owner.
obj
)

Called when the resource changes owner.

public void
drop(T
The Resource instance being dropped.
obj
)

Dispose of the resources in the given Resource instance.

public Drop<T>

Returns:

A drop instance, similar to this one, but for the purpose of being associated with a different but related resource.
fork
()

Branch the responsibility of dropping a resource.

Method Detail

attachback to summary
public void attach(T obj)

Called when the resource changes owner.

Parameters
obj:T

The new Resource instance with the new owner.

dropback to summary
public void drop(T obj)

Dispose of the resources in the given Resource instance.

Parameters
obj:T

The Resource instance being dropped.

forkback to summary
public Drop<T> fork()

Branch the responsibility of dropping a resource. This drop instance will remain associated with its current resource, while the returned drop instance must be attached to its new resource.

Returns:Drop<T>

A drop instance, similar to this one, but for the purpose of being associated with a different but related resource.