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.NonWakeupRunnableNested classes/interfaces inherited from class io.netty.util.concurrent.AbstractEventExecutor
io.netty.util.concurrent.AbstractEventExecutor.LazyRunnable -
Field Summary
FieldsFields inherited from class io.netty.channel.SingleThreadEventLoop
DEFAULT_MAX_PENDING_TASKS -
Constructor Summary
ConstructorsConstructorDescriptionSlowAwareDefaultEventLoop(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 TypeMethodDescriptionvoidio.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
runMethods inherited from class io.netty.channel.SingleThreadEventLoop
afterRunningAllTasks, executeAfterEventLoopIteration, hasTasks, next, parent, pendingTasks, register, register, register, registeredChannels, registeredChannelsIteratorMethods 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, wakeupMethods inherited from class io.netty.util.concurrent.AbstractScheduledEventExecutor
afterScheduledTaskSubmitted, beforeScheduledTaskSubmitted, cancelScheduledTasks, deadlineToDelayNanos, getCurrentTimeNanos, hasScheduledTasks, initialNanoTime, nanoTime, nextScheduledTaskDeadlineNanos, nextScheduledTaskNano, pollScheduledTask, pollScheduledTask, schedule, validateScheduledMethods inherited from class io.netty.util.concurrent.AbstractEventExecutor
inEventLoop, iterator, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, newTaskFor, newTaskFor, runTask, safeExecute, shutdownGracefully, shutdownNow, submit, submit, submitMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.util.concurrent.EventExecutor
inEventLoop, inEventLoop, newFailedFuture, newProgressivePromise, newPromise, newSucceededFutureMethods inherited from interface io.netty.util.concurrent.EventExecutorGroup
isShuttingDown, iterator, schedule, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFutureMethods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminatedMethods 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:
schedulein interfaceio.netty.util.concurrent.EventExecutorGroup- Specified by:
schedulein interfaceScheduledExecutorService- Overrides:
schedulein classio.netty.util.concurrent.AbstractScheduledEventExecutor
-
scheduleAtFixedRate
public io.netty.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) - Specified by:
scheduleAtFixedRatein interfaceio.netty.util.concurrent.EventExecutorGroup- Specified by:
scheduleAtFixedRatein interfaceScheduledExecutorService- Overrides:
scheduleAtFixedRatein classio.netty.util.concurrent.AbstractScheduledEventExecutor
-
scheduleWithFixedDelay
public io.netty.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) - Specified by:
scheduleWithFixedDelayin interfaceio.netty.util.concurrent.EventExecutorGroup- Specified by:
scheduleWithFixedDelayin interfaceScheduledExecutorService- Overrides:
scheduleWithFixedDelayin classio.netty.util.concurrent.AbstractScheduledEventExecutor
-