Top Fields Constructors Methods
io.netty5.buffer.internal

public final Class ArcDrop<T>

extends Object
implements Drop<T>
Class Inheritance
All Implemented Interfaces
io.netty5.buffer.Drop
Imports
io.netty5.buffer.Drop, java.lang.invoke.MethodHandles, .VarHandle

Field Summary

Modifier and TypeField and Description
private static final VarHandle
private volatile int
private final Drop<T>

Constructor Summary

AccessConstructor and Description
public
ArcDrop(Drop<T> delegate)

Method Summary

Modifier and TypeMethod and Description
public static <X> Drop<X>
acquire(Drop<X> drop)

public void
attach(T
The new Resource instance with the new owner.
obj
)

Implements io.netty5.buffer.Drop.attach.

Called when the resource changes owner.
private static void
checkValidState(int count)

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

Implements io.netty5.buffer.Drop.drop.

Dispose of the resources in the given Resource instance.
public Drop<T>
fork()

Implements io.netty5.buffer.Drop.fork.

Branch the responsibility of dropping a resource.
public ArcDrop<T>
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public Drop<T>
public static <X> Drop<X>
wrap(Drop<X> drop)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

COUNTback to summary
private static final VarHandle COUNT
countback to summary
private volatile int count
Annotations
@SuppressWarnings:FieldMayBeFinal, unused
delegateback to summary
private final Drop<T> delegate

Constructor Detail

ArcDropback to summary
public ArcDrop(Drop<T> delegate)

Method Detail

acquireback to summary
public static <X> Drop<X> acquire(Drop<X> drop)
attachback to summary
public void attach(T obj)

Implements io.netty5.buffer.Drop.attach.

Doc from io.netty5.buffer.Drop.attach.

Called when the resource changes owner.

Parameters
obj:T

The new Resource instance with the new owner.

Annotations
@Override
checkValidStateback to summary
private static void checkValidState(int count)
dropback to summary
public void drop(T obj)

Implements io.netty5.buffer.Drop.drop.

Doc from io.netty5.buffer.Drop.drop.

Dispose of the resources in the given Resource instance.

Parameters
obj:T

The Resource instance being dropped.

Annotations
@Override
forkback to summary
public Drop<T> fork()

Implements io.netty5.buffer.Drop.fork.

Doc from io.netty5.buffer.Drop.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.

Annotations
@Override
incrementback to summary
public ArcDrop<T> increment()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
unwrapback to summary
public Drop<T> unwrap()
wrapback to summary
public static <X> Drop<X> wrap(Drop<X> drop)