GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Overview
  • Use
  • Tree
  • Deprecated
  • Index
  • Search
  • Help
  • io.netty.util.concurrent
  • AbstractEventExecutor

This view

  • Original page
  • New address

GeezerVison is showing netty.io — AbstractEventExecutor (Netty API Reference (4.1.141.Final))

Class AbstractEventExecutor

java.lang.Object
java.util.concurrent.AbstractExecutorService
io.netty.util.concurrent.AbstractEventExecutor
All Implemented Interfaces:
EventExecutor, EventExecutorGroup, Iterable<EventExecutor>, Executor, ExecutorService, ScheduledExecutorService
Direct Known Subclasses:
AbstractEventLoop, AbstractScheduledEventExecutor, ImmediateEventExecutor

public abstract class AbstractEventExecutor extends AbstractExecutorService implements EventExecutor
Abstract base class for EventExecutor implementations.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    AbstractEventExecutor.LazyRunnable
    Deprecated.
    override SingleThreadEventExecutor.wakesUpForTask(Runnable) to re-create this behaviour
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractEventExecutor()
     
    protected
    AbstractEventExecutor(EventExecutorGroup parent)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    inEventLoop()
    Calls EventExecutor.inEventLoop(Thread) with Thread.currentThread() as argument
    Iterator<EventExecutor>
    iterator()
     
    void
    lazyExecute(Runnable task)
    Like Executor.execute(Runnable) but does not guarantee the task will be run until either a non-lazy task is executed or the executor is shut down.
    <V> Future<V>
    newFailedFuture(Throwable cause)
    Create a new Future which is marked as failed already.
    <V> ProgressivePromise<V>
    newProgressivePromise()
    Create a new ProgressivePromise.
    <V> Promise<V>
    newPromise()
    Return a new Promise.
    <V> Future<V>
    newSucceededFuture(V result)
    Create a new Future which is marked as succeeded already.
    protected final <T> RunnableFuture<T>
    newTaskFor(Runnable runnable, T value)
     
    protected final <T> RunnableFuture<T>
    newTaskFor(Callable<T> callable)
     
    EventExecutor
    next()
    Returns a reference to itself.
    EventExecutorGroup
    parent()
    Return the EventExecutorGroup which is the parent of this EventExecutor,
    protected static void
    runTask(Runnable task)
     
    protected static void
    safeExecute(Runnable task)
    Try to execute the given Runnable and just log if it throws a Throwable.
    ScheduledFuture<?>
    schedule(Runnable command, long delay, TimeUnit unit)
     
    <V> ScheduledFuture<V>
    schedule(Callable<V> callable, long delay, TimeUnit unit)
     
    ScheduledFuture<?>
    scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
     
    ScheduledFuture<?>
    scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
     
    abstract void
    shutdown()
    Deprecated.
    EventExecutorGroup.shutdownGracefully(long, long, TimeUnit) or shutdownGracefully() instead.
    Future<?>
    shutdownGracefully()
    Shortcut method for EventExecutorGroup.shutdownGracefully(long, long, TimeUnit) with sensible default values.
    List<Runnable>
    shutdownNow()
    Deprecated.
    EventExecutorGroup.shutdownGracefully(long, long, TimeUnit) or shutdownGracefully() instead.
    Future<?>
    submit(Runnable task)
     
    <T> Future<T>
    submit(Runnable task, T result)
     
    <T> Future<T>
    submit(Callable<T> task)
     

    Methods inherited from class AbstractExecutorService

    invokeAll, invokeAll, invokeAny, invokeAny

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface EventExecutor

    inEventLoop
    Modifier and Type
    Method
    Description
    boolean
    inEventLoop(Thread thread)
    Return true if the given Thread is executed in the event loop, false otherwise.

    Methods inherited from interface EventExecutorGroup

    isShuttingDown, shutdownGracefully, terminationFuture
    Modifier and Type
    Method
    Description
    boolean
    isShuttingDown()
    Returns true if and only if all EventExecutors managed by this EventExecutorGroup are being shut down gracefully or was shut down.
    Future<?>
    shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit)
    Signals this executor that the caller wants the executor to be shut down.
    Future<?>
    terminationFuture()
    Returns the Future which is notified when all EventExecutors managed by this EventExecutorGroup have been terminated.

    Methods inherited from interface Executor

    execute

    Methods inherited from interface ExecutorService

    awaitTermination, isShutdown, isTerminated

    Methods inherited from interface Iterable

    forEach, spliterator
  • Constructor Details

    • AbstractEventExecutor

      protected AbstractEventExecutor()
    • AbstractEventExecutor

      protected AbstractEventExecutor(EventExecutorGroup parent)
  • Method Details

    • parent

      public EventExecutorGroup parent()
      Description copied from interface: EventExecutor
      Return the EventExecutorGroup which is the parent of this EventExecutor,
      Specified by:
      parent in interface EventExecutor
    • next

      public EventExecutor next()
      Description copied from interface: EventExecutor
      Returns a reference to itself.
      Specified by:
      next in interface EventExecutor
      Specified by:
      next in interface EventExecutorGroup
    • inEventLoop

      public boolean inEventLoop()
      Description copied from interface: EventExecutor
      Calls EventExecutor.inEventLoop(Thread) with Thread.currentThread() as argument
      Specified by:
      inEventLoop in interface EventExecutor
    • iterator

      public Iterator<EventExecutor> iterator()
      Specified by:
      iterator in interface EventExecutorGroup
      Specified by:
      iterator in interface Iterable<EventExecutor>
    • shutdownGracefully

      public Future<?> shutdownGracefully()
      Description copied from interface: EventExecutorGroup
      Shortcut method for EventExecutorGroup.shutdownGracefully(long, long, TimeUnit) with sensible default values.
      Specified by:
      shutdownGracefully in interface EventExecutorGroup
      Returns:
      the EventExecutorGroup.terminationFuture()
    • shutdown

      @Deprecated public abstract void shutdown()
      Deprecated.
      EventExecutorGroup.shutdownGracefully(long, long, TimeUnit) or shutdownGracefully() instead.
      Specified by:
      shutdown in interface EventExecutorGroup
      Specified by:
      shutdown in interface ExecutorService
    • shutdownNow

      @Deprecated public List<Runnable> shutdownNow()
      Deprecated.
      EventExecutorGroup.shutdownGracefully(long, long, TimeUnit) or shutdownGracefully() instead.
      Specified by:
      shutdownNow in interface EventExecutorGroup
      Specified by:
      shutdownNow in interface ExecutorService
    • newPromise

      public <V> Promise<V> newPromise()
      Description copied from interface: EventExecutor
      Return a new Promise.
      Specified by:
      newPromise in interface EventExecutor
    • newProgressivePromise

      public <V> ProgressivePromise<V> newProgressivePromise()
      Description copied from interface: EventExecutor
      Create a new ProgressivePromise.
      Specified by:
      newProgressivePromise in interface EventExecutor
    • newSucceededFuture

      public <V> Future<V> newSucceededFuture(V result)
      Description copied from interface: EventExecutor
      Create a new Future which is marked as succeeded already. So Future.isSuccess() will return true. All FutureListener added to it will be notified directly. Also every call of blocking methods will just return without blocking.
      Specified by:
      newSucceededFuture in interface EventExecutor
    • newFailedFuture

      public <V> Future<V> newFailedFuture(Throwable cause)
      Description copied from interface: EventExecutor
      Create a new Future which is marked as failed already. So Future.isSuccess() will return false. All FutureListener added to it will be notified directly. Also every call of blocking methods will just return without blocking.
      Specified by:
      newFailedFuture in interface EventExecutor
    • submit

      public Future<?> submit(Runnable task)
      Specified by:
      submit in interface EventExecutorGroup
      Specified by:
      submit in interface ExecutorService
      Overrides:
      submit in class AbstractExecutorService
    • submit

      public <T> Future<T> submit(Runnable task, T result)
      Specified by:
      submit in interface EventExecutorGroup
      Specified by:
      submit in interface ExecutorService
      Overrides:
      submit in class AbstractExecutorService
    • submit

      public <T> Future<T> submit(Callable<T> task)
      Specified by:
      submit in interface EventExecutorGroup
      Specified by:
      submit in interface ExecutorService
      Overrides:
      submit in class AbstractExecutorService
    • newTaskFor

      protected final <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value)
      Overrides:
      newTaskFor in class AbstractExecutorService
    • newTaskFor

      protected final <T> RunnableFuture<T> newTaskFor(Callable<T> callable)
      Overrides:
      newTaskFor in class AbstractExecutorService
    • schedule

      public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
      Specified by:
      schedule in interface EventExecutorGroup
      Specified by:
      schedule in interface ScheduledExecutorService
    • schedule

      public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
      Specified by:
      schedule in interface EventExecutorGroup
      Specified by:
      schedule in interface ScheduledExecutorService
    • scheduleAtFixedRate

      public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
      Specified by:
      scheduleAtFixedRate in interface EventExecutorGroup
      Specified by:
      scheduleAtFixedRate in interface ScheduledExecutorService
    • scheduleWithFixedDelay

      public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
      Specified by:
      scheduleWithFixedDelay in interface EventExecutorGroup
      Specified by:
      scheduleWithFixedDelay in interface ScheduledExecutorService
    • safeExecute

      protected static void safeExecute(Runnable task)
      Try to execute the given Runnable and just log if it throws a Throwable.
    • runTask

      protected static void runTask(Runnable task)
    • lazyExecute

      @UnstableApi public void lazyExecute(Runnable task)
      Like Executor.execute(Runnable) but does not guarantee the task will be run until either a non-lazy task is executed or the executor is shut down.

      The default implementation just delegates to Executor.execute(Runnable).

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.