Package io.netty.channel.uring
Class IoUringIoHandler.DefaultIoUringIoRegistration
- java.lang.Object
-
- io.netty.channel.uring.IoUringIoHandler.DefaultIoUringIoRegistration
-
- All Implemented Interfaces:
IoRegistration
- Enclosing class:
- IoUringIoHandler
private final class IoUringIoHandler.DefaultIoUringIoRegistration extends java.lang.Object implements IoRegistration
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicBooleancanceledprivate IoUringIoEventeventprivate ThreadAwareExecutorexecutor(package private) IoUringIoHandlehandleprivate intidprivate intoutstandingCompletionsprivate booleanremoveLater
-
Constructor Summary
Constructors Constructor Description DefaultIoUringIoRegistration(ThreadAwareExecutor executor, IoUringIoHandle handle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tattachment()Implementation specific attachment, which might benull.booleancancel()Cancel the registration.private booleancanUseFastPath(long userData)(package private) voidclose()private intfd()(package private) voidhandle(int res, int flags, byte op, long userData, java.nio.ByteBuffer extraCqeData)booleanisValid()Returnstrueif the registration is still valid.private voidremove()(package private) voidsetId(int id)longsubmit(IoOps ops)Submit theIoOpsto the registration.private voidsubmitFastPath0(IoUringIoOps ioOps, long seq)private voidsubmitSlowPath0(IoUringIoOps ioOps, long token, long userData)private voidtryRemove()
-
-
-
Field Detail
-
canceled
private final java.util.concurrent.atomic.AtomicBoolean canceled
-
executor
private final ThreadAwareExecutor executor
-
event
private final IoUringIoEvent event
-
handle
final IoUringIoHandle handle
-
removeLater
private boolean removeLater
-
outstandingCompletions
private int outstandingCompletions
-
id
private int id
-
-
Constructor Detail
-
DefaultIoUringIoRegistration
DefaultIoUringIoRegistration(ThreadAwareExecutor executor, IoUringIoHandle handle)
-
-
Method Detail
-
setId
void setId(int id)
-
submit
public long submit(IoOps ops)
Description copied from interface:IoRegistrationSubmit theIoOpsto the registration.- Specified by:
submitin interfaceIoRegistration- Parameters:
ops- ops.- Returns:
- an identifier for the operation, which might be unique or not (depending on the implementation).
-
submitFastPath0
private void submitFastPath0(IoUringIoOps ioOps, long seq)
-
submitSlowPath0
private void submitSlowPath0(IoUringIoOps ioOps, long token, long userData)
-
canUseFastPath
private boolean canUseFastPath(long userData)
-
fd
private int fd()
-
attachment
public <T> T attachment()
Description copied from interface:IoRegistrationImplementation specific attachment, which might benull.- Specified by:
attachmentin interfaceIoRegistration- Returns:
- attachment.
-
isValid
public boolean isValid()
Description copied from interface:IoRegistrationReturnstrueif the registration is still valid. OnceIoRegistration.cancel()is called this will returnfalse.- Specified by:
isValidin interfaceIoRegistration- Returns:
- valid.
-
cancel
public boolean cancel()
Description copied from interface:IoRegistrationCancel the registration.- Specified by:
cancelin interfaceIoRegistration- Returns:
trueif cancellation was successful,falseotherwise.
-
tryRemove
private void tryRemove()
-
remove
private void remove()
-
close
void close()
-
handle
void handle(int res, int flags, byte op, long userData, java.nio.ByteBuffer extraCqeData)
-
-