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

@UnstableApi public class SlowAwareDefaultEventLoop extends io.netty.channel.DefaultEventLoop
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
    Modifier and Type
    Field
    Description
    static final float
     

    Fields inherited from class io.netty.channel.SingleThreadEventLoop

    DEFAULT_MAX_PENDING_TASKS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    SlowAwareDefaultEventLoop(io.netty.channel.EventLoopGroup parent)
     
    SlowAwareDefaultEventLoop(io.netty.channel.EventLoopGroup parent, Executor executor)
     
    SlowAwareDefaultEventLoop(io.netty.channel.EventLoopGroup parent, ThreadFactory threadFactory)
     
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    io.netty.util.concurrent.ScheduledFuture<?>
    schedule(Runnable command, long delay, TimeUnit unit)
     
    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

      public SlowAwareDefaultEventLoop(ThreadFactory threadFactory)
    • SlowAwareDefaultEventLoop

      public SlowAwareDefaultEventLoop(Executor executor)
    • SlowAwareDefaultEventLoop

      public SlowAwareDefaultEventLoop(io.netty.channel.EventLoopGroup parent)
    • SlowAwareDefaultEventLoop

      public SlowAwareDefaultEventLoop(io.netty.channel.EventLoopGroup parent, ThreadFactory threadFactory)
    • SlowAwareDefaultEventLoop

      public SlowAwareDefaultEventLoop(io.netty.channel.EventLoopGroup parent, Executor executor)
  • Method Details

    • execute

      public void execute(Runnable task)
      Specified by:
      execute in interface Executor
      Overrides:
      execute in class io.netty.util.concurrent.SingleThreadEventExecutor
    • schedule

      public io.netty.util.concurrent.ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
      Specified by:
      schedule in interface io.netty.util.concurrent.EventExecutorGroup
      Specified by:
      schedule in interface ScheduledExecutorService
      Overrides:
      schedule in class io.netty.util.concurrent.AbstractScheduledEventExecutor
    • scheduleAtFixedRate

      public io.netty.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
      Specified by:
      scheduleAtFixedRate in interface io.netty.util.concurrent.EventExecutorGroup
      Specified by:
      scheduleAtFixedRate in interface ScheduledExecutorService
      Overrides:
      scheduleAtFixedRate in class io.netty.util.concurrent.AbstractScheduledEventExecutor
    • scheduleWithFixedDelay

      public io.netty.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
      Specified by:
      scheduleWithFixedDelay in interface io.netty.util.concurrent.EventExecutorGroup
      Specified by:
      scheduleWithFixedDelay in interface ScheduledExecutorService
      Overrides:
      scheduleWithFixedDelay in class io.netty.util.concurrent.AbstractScheduledEventExecutor