Package io.netty.channel.kqueue
Class KQueueIoHandler.DefaultKqueueIoRegistration
- java.lang.Object
-
- io.netty.channel.kqueue.KQueueIoHandler.DefaultKqueueIoRegistration
-
- All Implemented Interfaces:
IoRegistration
- Enclosing class:
- KQueueIoHandler
private final class KQueueIoHandler.DefaultKqueueIoRegistration extends java.lang.Object implements IoRegistration
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicBooleancanceledprivate booleancancellationPendingprivate KQueueIoEventeventprivate ThreadAwareExecutorexecutor(package private) KQueueIoHandlehandle(package private) longid
-
Constructor Summary
Constructors Constructor Description DefaultKqueueIoRegistration(ThreadAwareExecutor executor, KQueueIoHandle 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 voidcancel0()(package private) voidclose()private voidevSet(short filter, short flags, int fflags, long data)(package private) voidhandle(int ident, short filter, short flags, int fflags, long data, long udata)(package private) booleanisHandleForChannel()booleanisValid()Returnstrueif the registration is still valid.longsubmit(IoOps ops)Submit theIoOpsto the registration.
-
-
-
Field Detail
-
cancellationPending
private boolean cancellationPending
-
canceled
private final java.util.concurrent.atomic.AtomicBoolean canceled
-
event
private final KQueueIoEvent event
-
handle
final KQueueIoHandle handle
-
id
final long id
-
executor
private final ThreadAwareExecutor executor
-
-
Constructor Detail
-
DefaultKqueueIoRegistration
DefaultKqueueIoRegistration(ThreadAwareExecutor executor, KQueueIoHandle handle)
-
-
Method Detail
-
isHandleForChannel
boolean isHandleForChannel()
-
attachment
public <T> T attachment()
Description copied from interface:IoRegistrationImplementation specific attachment, which might benull.- Specified by:
attachmentin interfaceIoRegistration- Returns:
- attachment.
-
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).
-
handle
void handle(int ident, short filter, short flags, int fflags, long data, long udata)
-
evSet
private void evSet(short filter, short flags, int fflags, long data)
-
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.
-
cancel0
private void cancel0()
-
close
void close()
-
-