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 voidclose()Discard thisSendand the object it contains.Ireceive()Receive theResourceinstance being sent, and bind its ownership to the calling thread.booleanreferentIsInstanceOf(Class<?> cls)Determine if the object received from thisSendis an instance of the given class.
-
-
-
Method Detail
-
receive
public I receive()
Description copied from interface:SendReceive theResourceinstance 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:SendDetermine if the object received from thisSendis an instance of the given class.- Specified by:
referentIsInstanceOfin interfaceSend<I extends Resource<I>>- Parameters:
cls- The type to check.- Returns:
trueif the object received from thisSendcan be assigned fields or variables of the given type, otherwise false.
-
-