Package org.drasyl.util
Class SlowAwareDefaultEventLoop
java.lang.Object
java.util.concurrent.AbstractExecutorService
io.netty.util.concurrent.AbstractEventExecutor
io.netty.util.concurrent.AbstractScheduledEventExecutor
io.netty.util.concurrent.SingleThreadEventExecutor
io.netty.channel.SingleThreadEventLoop
io.netty.channel.DefaultEventLoop
org.drasyl.util.SlowAwareDefaultEventLoop
- All Implemented Interfaces:
io.netty.channel.EventLoop
,io.netty.channel.EventLoopGroup
,io.netty.util.concurrent.EventExecutor
,io.netty.util.concurrent.EventExecutorGroup
,io.netty.util.concurrent.OrderedEventExecutor
,Iterable<io.netty.util.concurrent.EventExecutor>
,Executor
,ExecutorService
,ScheduledExecutorService
A
DefaultEventLoop
that is aware of slow task executions.-
Nested Class Summary
Nested classes/interfaces inherited from class io.netty.channel.SingleThreadEventLoop
io.netty.channel.SingleThreadEventLoop.ChannelsReadOnlyIterator<T extends io.netty.channel.Channel>
Nested classes/interfaces inherited from class io.netty.util.concurrent.SingleThreadEventExecutor
io.netty.util.concurrent.SingleThreadEventExecutor.NonWakeupRunnable
Nested classes/interfaces inherited from class io.netty.util.concurrent.AbstractEventExecutor
io.netty.util.concurrent.AbstractEventExecutor.LazyRunnable
-
Field Summary
Fields inherited from class io.netty.channel.SingleThreadEventLoop
DEFAULT_MAX_PENDING_TASKS
-
Constructor Summary
ConstructorDescriptionSlowAwareDefaultEventLoop
(io.netty.channel.EventLoopGroup parent) SlowAwareDefaultEventLoop
(io.netty.channel.EventLoopGroup parent, Executor executor) SlowAwareDefaultEventLoop
(io.netty.channel.EventLoopGroup parent, ThreadFactory threadFactory) SlowAwareDefaultEventLoop
(Executor executor) SlowAwareDefaultEventLoop
(ThreadFactory threadFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
io.netty.util.concurrent.ScheduledFuture<?>
io.netty.util.concurrent.ScheduledFuture<?>
scheduleAtFixedRate
(Runnable command, long initialDelay, long period, TimeUnit unit) io.netty.util.concurrent.ScheduledFuture<?>
scheduleWithFixedDelay
(Runnable command, long initialDelay, long delay, TimeUnit unit) Methods inherited from class io.netty.channel.DefaultEventLoop
run
Methods inherited from class io.netty.channel.SingleThreadEventLoop
afterRunningAllTasks, executeAfterEventLoopIteration, hasTasks, next, parent, pendingTasks, register, register, register, registeredChannels, registeredChannelsIterator
Methods inherited from class io.netty.util.concurrent.SingleThreadEventExecutor
addShutdownHook, addTask, awaitTermination, cleanup, confirmShutdown, deadlineNanos, delayNanos, inEventLoop, interruptThread, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isShuttingDown, isTerminated, lazyExecute, newTaskQueue, newTaskQueue, peekTask, pollTask, pollTaskFrom, reject, reject, removeShutdownHook, removeTask, runAllTasks, runAllTasks, runAllTasksFrom, runScheduledAndExecutorTasks, shutdown, shutdownGracefully, takeTask, terminationFuture, threadProperties, updateLastExecutionTime, wakesUpForTask, wakeup
Methods inherited from class io.netty.util.concurrent.AbstractScheduledEventExecutor
afterScheduledTaskSubmitted, beforeScheduledTaskSubmitted, cancelScheduledTasks, deadlineToDelayNanos, getCurrentTimeNanos, hasScheduledTasks, initialNanoTime, nanoTime, nextScheduledTaskDeadlineNanos, nextScheduledTaskNano, pollScheduledTask, pollScheduledTask, schedule, validateScheduled
Methods inherited from class io.netty.util.concurrent.AbstractEventExecutor
inEventLoop, iterator, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, newTaskFor, newTaskFor, runTask, safeExecute, shutdownGracefully, shutdownNow, submit, submit, submit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.netty.util.concurrent.EventExecutor
inEventLoop, inEventLoop, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture
Methods inherited from interface io.netty.util.concurrent.EventExecutorGroup
isShuttingDown, iterator, schedule, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFuture
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
THRESHOLD
public static final float THRESHOLD
-
-
Constructor Details
-
SlowAwareDefaultEventLoop
public SlowAwareDefaultEventLoop() -
SlowAwareDefaultEventLoop
-
SlowAwareDefaultEventLoop
-
SlowAwareDefaultEventLoop
public SlowAwareDefaultEventLoop(io.netty.channel.EventLoopGroup parent) -
SlowAwareDefaultEventLoop
public SlowAwareDefaultEventLoop(io.netty.channel.EventLoopGroup parent, ThreadFactory threadFactory) -
SlowAwareDefaultEventLoop
-
-
Method Details
-
execute
-
schedule
public io.netty.util.concurrent.ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) - Specified by:
schedule
in interfaceio.netty.util.concurrent.EventExecutorGroup
- Specified by:
schedule
in interfaceScheduledExecutorService
- Overrides:
schedule
in classio.netty.util.concurrent.AbstractScheduledEventExecutor
-
scheduleAtFixedRate
public io.netty.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) - Specified by:
scheduleAtFixedRate
in interfaceio.netty.util.concurrent.EventExecutorGroup
- Specified by:
scheduleAtFixedRate
in interfaceScheduledExecutorService
- Overrides:
scheduleAtFixedRate
in classio.netty.util.concurrent.AbstractScheduledEventExecutor
-
scheduleWithFixedDelay
public io.netty.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) - Specified by:
scheduleWithFixedDelay
in interfaceio.netty.util.concurrent.EventExecutorGroup
- Specified by:
scheduleWithFixedDelay
in interfaceScheduledExecutorService
- Overrides:
scheduleWithFixedDelay
in classio.netty.util.concurrent.AbstractScheduledEventExecutor
-