Package io.netty5.buffer.api.internal
Class SendFromOwned<I extends Resource<I>,T extends ResourceSupport<I,T>>
- java.lang.Object
-
- io.netty5.buffer.api.internal.SendFromOwned<I,T>
-
- All Implemented Interfaces:
Send<I>
,io.netty5.util.SafeCloseable
,AutoCloseable
public class SendFromOwned<I extends Resource<I>,T extends ResourceSupport<I,T>> extends Object implements Send<I>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Discard thisSend
and the object it contains.I
receive()
Receive theResource
instance being sent, and bind its ownership to the calling thread.boolean
referentIsInstanceOf(Class<?> cls)
Determine if the object received from thisSend
is an instance of the given class.
-
-
-
Method Detail
-
receive
public I receive()
Description copied from interface:Send
Receive theResource
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.
-
referentIsInstanceOf
public boolean referentIsInstanceOf(Class<?> cls)
Description copied from interface:Send
Determine if the object received from thisSend
is an instance of the given class.- Specified by:
referentIsInstanceOf
in interfaceSend<I extends Resource<I>>
- Parameters:
cls
- The type to check.- Returns:
true
if the object received from thisSend
can be assigned fields or variables of the given type, otherwise false.
-
-