IoHandler which uses epoll under the covers. Only works on Linux!
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private static final long | |
| private final IntObjectMap | |
| private NativeDatagramPacketArray | |
| private static final long | |
| private final FileDescriptor | |
| private final FileDescriptor | |
| private final EpollEventArray | |
| private IovArray | |
| private static final InternalLogger | |
| private static final long | |
| private final AtomicLong | |
| private static final long | |
| private boolean | |
| private long | |
| private final IntSupplier | |
| private final SelectStrategy | |
| private final FileDescriptor |
| Access | Constructor and Description |
|---|---|
| private | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private static AbstractEpollChannel | |
| private NativeDatagramPacketArray | |
| private IovArray | |
| public final void | deregister(IoHandle
the handle)IoHandle to deregister..Implements io. IoHandle for IO.
|
| public final void | destroy()
Implements io. IoHandler and free all its resources.
|
| private int | |
| private long | |
| private int | |
| private int | |
| private int | |
| pack-priv void | |
| public boolean | isCompatible(Class<? extends IoHandle>
the type of the handleType)IoHandle.Implements io. true if the given type is compatible with this IoHandler and so can be registered,
false otherwise.
|
| private void | modify(AbstractEpollChannel<?> ch)
The flags of the given epoll was modified so update the registration |
| public static IoHandlerFactory | |
| public static IoHandlerFactory | newFactory(final int maxEvents, final SelectStrategyFactory selectStrategyFactory)
Returns a new |
| public void | prepareToDestroy()
Implements io. IoHandler.
|
| private boolean | |
| public final void | register(IoHandle
the handle)Channel to register..Implements io. Channel for IO.
|
| private void | |
| public final int | run(IoExecutionContext context)
Implements io. IoHandler.
|
| public final void | wakeup(boolean inEventLoop)
Implements io. IoHandler, which means if any operation blocks it should be unblocked and
return as soon as possible.
|
| allowGrowing | back to summary |
|---|---|
| private final boolean allowGrowing | |
| AWAKE | back to summary |
|---|---|
| private static final long AWAKE | |
| channels | back to summary |
|---|---|
| private final IntObjectMap<AbstractEpollChannel<?>> channels | |
| datagramPacketArray | back to summary |
|---|---|
| private NativeDatagramPacketArray datagramPacketArray | |
| EPOLL_WAIT_MILLIS_THRESHOLD | back to summary |
|---|---|
| private static final long EPOLL_WAIT_MILLIS_THRESHOLD | |
| epollFd | back to summary |
|---|---|
| private final FileDescriptor epollFd | |
| eventFd | back to summary |
|---|---|
| private final FileDescriptor eventFd | |
| events | back to summary |
|---|---|
| private final EpollEventArray events | |
| iovArray | back to summary |
|---|---|
| private IovArray iovArray | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| MAX_SCHEDULED_TIMERFD_NS | back to summary |
|---|---|
| private static final long MAX_SCHEDULED_TIMERFD_NS | |
| nextWakeupNanos | back to summary |
|---|---|
| private final AtomicLong nextWakeupNanos | |
| NONE | back to summary |
|---|---|
| private static final long NONE | |
| pendingWakeup | back to summary |
|---|---|
| private boolean pendingWakeup | |
| prevDeadlineNanos | back to summary |
|---|---|
| private long prevDeadlineNanos | |
| selectNowSupplier | back to summary |
|---|---|
| private final IntSupplier selectNowSupplier | |
| selectStrategy | back to summary |
|---|---|
| private final SelectStrategy selectStrategy | |
| timerFd | back to summary |
|---|---|
| private final FileDescriptor timerFd | |
| EpollHandler | back to summary |
|---|---|
| private EpollHandler() | |
| EpollHandler | back to summary |
|---|---|
| pack-priv EpollHandler(int maxEvents, SelectStrategy strategy) | |
| add | back to summary |
|---|---|
| private void add(AbstractEpollChannel<?> ch) throws IOException Register the given channel with this | |
| cast | back to summary |
|---|---|
| private static AbstractEpollChannel | |
| cleanDatagramPacketArray | back to summary |
|---|---|
| private NativeDatagramPacketArray cleanDatagramPacketArray() | |
| cleanIovArray | back to summary |
|---|---|
| private IovArray cleanIovArray() | |
| deregister | back to summary |
|---|---|
| public final void deregister(IoHandle handle) throws Exception Implements io. Doc from io. Deregister a | |
| destroy | back to summary |
|---|---|
| public final void destroy() Implements io. Doc from io. Destroy the
| |
| epollBusyWait | back to summary |
|---|---|
| private int epollBusyWait() throws IOException | |
| epollWait | back to summary |
|---|---|
| private long epollWait(IoExecutionContext context, long deadlineNanos) throws IOException | |
| epollWaitNoTimerChange | back to summary |
|---|---|
| private int epollWaitNoTimerChange() throws IOException | |
| epollWaitNow | back to summary |
|---|---|
| private int epollWaitNow() throws IOException | |
| epollWaitTimeboxed | back to summary |
|---|---|
| private int epollWaitTimeboxed() throws IOException | |
| handleLoopException | back to summary |
|---|---|
| pack-priv void handleLoopException(Throwable t) Visible only for testing! | |
| isCompatible | back to summary |
|---|---|
| public boolean isCompatible(Class<? extends IoHandle> handleType) Implements io. Doc from io. Returns | |
| modify | back to summary |
|---|---|
| private void modify(AbstractEpollChannel<?> ch) throws IOException The flags of the given epoll was modified so update the registration | |
| newFactory | back to summary |
|---|---|
| public static IoHandlerFactory newFactory() Returns a new | |
| newFactory | back to summary |
|---|---|
| public static IoHandlerFactory newFactory(final int maxEvents, final SelectStrategyFactory selectStrategyFactory) Returns a new | |
| prepareToDestroy | back to summary |
|---|---|
| public void prepareToDestroy() Implements io. Doc from io. Prepare to destroy this
| |
| processReady | back to summary |
|---|---|
| private boolean processReady(EpollEventArray events, int ready) | |
| register | back to summary |
|---|---|
| public final void register(IoHandle handle) throws Exception Implements io. Doc from io. Register a | |
| remove | back to summary |
|---|---|
| private void remove(AbstractEpollChannel<?> ch) throws IOException Deregister the given channel from this | |
| run | back to summary |
|---|---|
| public final int run(IoExecutionContext context) Implements io. Doc from io. Run the IO handled by this | |
| wakeup | back to summary |
|---|---|
| public final void wakeup(boolean inEventLoop) Implements io. Doc from io. Wakeup the
| |