Class SingleThreadEventLoop

    • Field Detail

      • DEFAULT_MAX_PENDING_TASKS

        protected static final int DEFAULT_MAX_PENDING_TASKS
    • Constructor Detail

      • SingleThreadEventLoop

        protected SingleThreadEventLoop​(EventLoopGroup parent,
                                        ThreadFactory threadFactory,
                                        boolean addTaskWakesUp)
      • SingleThreadEventLoop

        protected SingleThreadEventLoop​(EventLoopGroup parent,
                                        ThreadFactory threadFactory,
                                        boolean addTaskWakesUp,
                                        boolean supportSuspension)
      • SingleThreadEventLoop

        protected SingleThreadEventLoop​(EventLoopGroup parent,
                                        Executor executor,
                                        boolean addTaskWakesUp)
      • SingleThreadEventLoop

        protected SingleThreadEventLoop​(EventLoopGroup parent,
                                        Executor executor,
                                        boolean addTaskWakesUp,
                                        boolean supportSuspension)
      • SingleThreadEventLoop

        protected SingleThreadEventLoop​(EventLoopGroup parent,
                                        ThreadFactory threadFactory,
                                        boolean addTaskWakesUp,
                                        int maxPendingTasks,
                                        io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)
      • SingleThreadEventLoop

        protected SingleThreadEventLoop​(EventLoopGroup parent,
                                        ThreadFactory threadFactory,
                                        boolean addTaskWakesUp,
                                        boolean supportSuspension,
                                        int maxPendingTasks,
                                        io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)
      • SingleThreadEventLoop

        protected SingleThreadEventLoop​(EventLoopGroup parent,
                                        Executor executor,
                                        boolean addTaskWakesUp,
                                        int maxPendingTasks,
                                        io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)
      • SingleThreadEventLoop

        protected SingleThreadEventLoop​(EventLoopGroup parent,
                                        Executor executor,
                                        boolean addTaskWakesUp,
                                        boolean supportSuspension,
                                        int maxPendingTasks,
                                        io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)
      • SingleThreadEventLoop

        protected SingleThreadEventLoop​(EventLoopGroup parent,
                                        Executor executor,
                                        boolean addTaskWakesUp,
                                        Queue<Runnable> taskQueue,
                                        Queue<Runnable> tailTaskQueue,
                                        io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)
      • SingleThreadEventLoop

        protected SingleThreadEventLoop​(EventLoopGroup parent,
                                        Executor executor,
                                        boolean addTaskWakesUp,
                                        boolean supportSuspension,
                                        Queue<Runnable> taskQueue,
                                        Queue<Runnable> tailTaskQueue,
                                        io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)
    • Method Detail

      • parent

        public EventLoopGroup parent()
        Specified by:
        parent in interface io.netty.util.concurrent.EventExecutor
        Specified by:
        parent in interface EventLoop
        Overrides:
        parent in class io.netty.util.concurrent.AbstractEventExecutor
      • next

        public EventLoop next()
        Description copied from interface: EventLoopGroup
        Return the next EventLoop to use
        Specified by:
        next in interface io.netty.util.concurrent.EventExecutorGroup
        Specified by:
        next in interface EventLoopGroup
        Overrides:
        next in class io.netty.util.concurrent.AbstractEventExecutor
      • executeAfterEventLoopIteration

        public final void executeAfterEventLoopIteration​(Runnable task)
        Adds a task to be run once at the end of next (or current) eventloop iteration.
        Parameters:
        task - to be added.
      • afterRunningAllTasks

        protected void afterRunningAllTasks()
        Overrides:
        afterRunningAllTasks in class io.netty.util.concurrent.SingleThreadEventExecutor
      • hasTasks

        protected boolean hasTasks()
        Overrides:
        hasTasks in class io.netty.util.concurrent.SingleThreadEventExecutor
      • pendingTasks

        public int pendingTasks()
        Overrides:
        pendingTasks in class io.netty.util.concurrent.SingleThreadEventExecutor
      • registeredChannels

        @UnstableApi
        public int registeredChannels()
        Returns the number of Channels registered with this EventLoop or -1 if operation is not supported. The returned value is not guaranteed to be exact accurate and should be viewed as a best effort.
      • registeredChannelsIterator

        @UnstableApi
        public Iterator<Channel> registeredChannelsIterator()
        Returns:
        read-only iterator of active Channels registered with this EventLoop. The returned value is not guaranteed to be exact accurate and should be viewed as a best effort. This method is expected to be called from within event loop.
        Throws:
        UnsupportedOperationException - if operation is not supported by implementation.