Package io.netty.channel.epoll
Class EpollIoHandler.DefaultEpollIoRegistration
- java.lang.Object
-
- io.netty.channel.epoll.EpollIoHandler.DefaultEpollIoRegistration
-
- All Implemented Interfaces:
IoRegistration
- Enclosing class:
- EpollIoHandler
private final class EpollIoHandler.DefaultEpollIoRegistration extends java.lang.Object implements IoRegistration
-
-
Field Summary
Fields Modifier and Type Field Description private ThreadAwareExecutorexecutor(package private) EpollIoHandlehandleprivate EpollIoHandler.RegistrationStatestate
-
Constructor Summary
Constructors Constructor Description DefaultEpollIoRegistration(ThreadAwareExecutor executor, EpollIoHandle 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()(package private) voidhandle(long ev)booleanisValid()Returnstrueif the registration is still valid.longsubmit(IoOps ops)Submit theIoOpsto the registration.
-
-
-
Field Detail
-
executor
private final ThreadAwareExecutor executor
-
state
private EpollIoHandler.RegistrationState state
-
handle
final EpollIoHandle handle
-
-
Constructor Detail
-
DefaultEpollIoRegistration
DefaultEpollIoRegistration(ThreadAwareExecutor executor, EpollIoHandle handle)
-
-
Method Detail
-
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).
-
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()
-
handle
void handle(long ev)
-
-