Top Fields Constructors Methods
io.netty5.buffer.internal

public Class SendFromOwned<I extends io.netty5.util.Resource<I>, T extends io.netty5.buffer.internal.ResourceSupport<I, T>>

extends Object
implements Send<I extends Resource<I>>
Class Inheritance
All Implemented Interfaces
io.netty5.util.Send, io.netty5.util.SafeCloseable, java.lang.AutoCloseable
Imports
io.netty5.buffer.Drop, .Owned, io.netty5.util.Resource, .Send, java.lang.invoke.VarHandle

Field Summary

Modifier and TypeField and Description
private final Class<?>
private final Drop<T>
private final Owned<T>
private static final VarHandle
private volatile boolean

Constructor Summary

AccessConstructor and Description
public
SendFromOwned(Owned<T> outgoing, Drop<T> drop, Class<?> concreteType)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements io.netty5.util.Send.close.

Discard this Send and the object it contains.
private void
public I
receive()

Implements io.netty5.util.Send.receive.

Receive the Resource instance being sent, and bind its ownership to the calling thread.
public boolean
referentIsInstanceOf(Class<?>
The type to check.
cls
)

Implements io.netty5.util.Send.referentIsInstanceOf.

Determine if the object received from this Send is an instance of the given class.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

concreteTypeback to summary
private final Class<?> concreteType
dropback to summary
private final Drop<T> drop
outgoingback to summary
private final Owned<T> outgoing
RECEIVEDback to summary
private static final VarHandle RECEIVED
receivedback to summary
private volatile boolean received
Annotations
@SuppressWarnings:unused

Constructor Detail

SendFromOwnedback to summary
public SendFromOwned(Owned<T> outgoing, Drop<T> drop, Class<?> concreteType)

Method Detail

closeback to summary
public void close()

Implements io.netty5.util.Send.close.

Doc from io.netty5.util.Send.close.

Discard this Send and the object it contains. This has no effect if the send-object has already been received.

Annotations
@Override
gateReceptionback to summary
private void gateReception()
receiveback to summary
public I receive()

Implements io.netty5.util.Send.receive.

Doc from io.netty5.util.Send.receive.

Receive the Resource instance being sent, and bind its ownership to the calling thread. The invalidation of the sent resource in the sending thread happens-before the return of this method.

This method can only be called once, and will throw otherwise.

Returns:I

The sent resource instance, never null.

Annotations
@SuppressWarnings:unchecked
@Override
referentIsInstanceOfback to summary
public boolean referentIsInstanceOf(Class<?> cls)

Implements io.netty5.util.Send.referentIsInstanceOf.

Doc from io.netty5.util.Send.referentIsInstanceOf.

Determine if the object received from this Send is an instance of the given class.

Parameters
cls:Class<?>

The type to check.

Returns:boolean

true if the object received from this Send can be assigned fields or variables of the given type, otherwise false.

Annotations
@Override