Top Description Inners Fields Constructors Methods
io.netty.util.concurrent

public final Class NonStickyEventExecutorGroup

extends Object
implements EventExecutorGroup
Class Inheritance
All Implemented Interfaces
io.netty.util.concurrent.EventExecutorGroup, java.lang.Iterable, java.util.concurrent.ScheduledExecutorService, java.util.concurrent.ExecutorService, java.lang.AutoCloseable, java.util.concurrent.Executor
Annotations
@UnstableApi
Imports
io.netty.util.internal.ObjectUtil, .PlatformDependent, .UnstableApi, java.util.Collection, .Iterator, .List, .Queue, java.util.concurrent.Callable, .ExecutionException, .RejectedExecutionException, .TimeUnit, .TimeoutException, java.util.concurrent.atomic.AtomicInteger, .AtomicReference

EventExecutorGroup which will preserve Runnable execution order but makes no guarantees about what EventExecutor (and therefore Thread) will be used to execute the Runnables.

The EventExecutorGroup#next() for the wrapped EventExecutorGroup must NOT return executors of type OrderedEventExecutor.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final EventExecutorGroup
private final int

Constructor Summary

AccessConstructor and Description
public
NonStickyEventExecutorGroup(EventExecutorGroup group)

Creates a new instance.

public
NonStickyEventExecutorGroup(EventExecutorGroup group, int maxTaskExecutePerRun)

Creates a new instance.

Method Summary

Modifier and TypeMethod and Description
public boolean
awaitTermination(long
the maximum time to wait
timeout
,
TimeUnit
the time unit of the timeout argument
unit
)

Implements java.util.concurrent.ExecutorService.awaitTermination.

Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.
public void
execute(Runnable
the runnable task
command
)

Implements java.util.concurrent.Executor.execute.

Executes the given command at some time in the future.
public <T> List<Future<T>>
invokeAll(Collection<? extends Callable<T>>
the collection of tasks
tasks
)

Implements java.util.concurrent.ExecutorService.invokeAll.

Executes the given tasks, returning a list of Futures holding their status and results when all complete.
public <T> List<Future<T>>
invokeAll(Collection<? extends Callable<T>>
the collection of tasks
tasks
,
long
the maximum time to wait
timeout
,
TimeUnit
the time unit of the timeout argument
unit
)

Implements java.util.concurrent.ExecutorService.invokeAll.

Executes the given tasks, returning a list of Futures holding their status and results when all complete or the timeout expires, whichever happens first.
public <T> T
invokeAny(Collection<? extends Callable<T>>
the collection of tasks
tasks
)

Implements java.util.concurrent.ExecutorService.invokeAny.

Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do.
public <T> T
invokeAny(Collection<? extends Callable<T>>
the collection of tasks
tasks
,
long
the maximum time to wait
timeout
,
TimeUnit
the time unit of the timeout argument
unit
)

Implements java.util.concurrent.ExecutorService.invokeAny.

Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do before the given timeout elapses.
public boolean
isShutdown()

Implements java.util.concurrent.ExecutorService.isShutdown.

Returns true if this executor has been shut down.
public boolean
public boolean
isTerminated()

Implements java.util.concurrent.ExecutorService.isTerminated.

Returns true if all tasks have completed following shut down.
public Iterator<EventExecutor>
iterator()

Implements io.netty.util.concurrent.EventExecutorGroup.iterator.

Returns an iterator over elements of type T.
private NonStickyEventExecutorGroup.NonStickyOrderedEventExecutor
public EventExecutor
public ScheduledFuture<?>
schedule(Runnable
the task to execute
command
,
long
the time from now to delay execution
delay
,
TimeUnit
the time unit of the delay parameter
unit
)

Implements io.netty.util.concurrent.EventExecutorGroup.schedule.

Submits a one-shot task that becomes enabled after the given delay.
public <V> ScheduledFuture<V>
schedule(Callable<V>
the function to execute
callable
,
long
the time from now to delay execution
delay
,
TimeUnit
the time unit of the delay parameter
unit
)

Implements io.netty.util.concurrent.EventExecutorGroup.schedule.

Submits a value-returning one-shot task that becomes enabled after the given delay.
public ScheduledFuture<?>
scheduleAtFixedRate(Runnable
the task to execute
command
,
long
the time to delay first execution
initialDelay
,
long
the period between successive executions
period
,
TimeUnit
the time unit of the initialDelay and period parameters
unit
)

Implements io.netty.util.concurrent.EventExecutorGroup.scheduleAtFixedRate.

Submits a periodic action that becomes enabled first after the given initial delay, and subsequently with the given period; that is, executions will commence after initialDelay, then initialDelay + period, then initialDelay + 2 * period, and so on.
public ScheduledFuture<?>
scheduleWithFixedDelay(Runnable
the task to execute
command
,
long
the time to delay first execution
initialDelay
,
long
the delay between the termination of one execution and the commencement of the next
delay
,
TimeUnit
the time unit of the initialDelay and delay parameters
unit
)

Implements io.netty.util.concurrent.EventExecutorGroup.scheduleWithFixedDelay.

Submits a periodic action that becomes enabled first after the given initial delay, and subsequently with the given delay between the termination of one execution and the commencement of the next.
public void
shutdown()

Implements io.netty.util.concurrent.EventExecutorGroup.shutdown.

Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted.
public Future<?>
public Future<?>
shutdownGracefully(long
the quiet period as described in the documentation
quietPeriod
,
long
the maximum amount of time to wait until the executor is shutdown() regardless if a task was submitted during the quiet period
timeout
,
TimeUnit
the unit of quietPeriod and timeout
unit
)

Implements io.netty.util.concurrent.EventExecutorGroup.shutdownGracefully.

Signals this executor that the caller wants the executor to be shut down.
public List<Runnable>
shutdownNow()

Implements io.netty.util.concurrent.EventExecutorGroup.shutdownNow.

Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution.
public Future<?>
submit(Runnable
the task to submit
task
)

Implements io.netty.util.concurrent.EventExecutorGroup.submit.

Submits a Runnable task for execution and returns a Future representing that task.
public <T> Future<T>
submit(Runnable
the task to submit
task
,
T
the result to return
result
)

Implements io.netty.util.concurrent.EventExecutorGroup.submit.

Submits a Runnable task for execution and returns a Future representing that task.
public <T> Future<T>
submit(Callable<T>
the task to submit
task
)

Implements io.netty.util.concurrent.EventExecutorGroup.submit.

Submits a value-returning task for execution and returns a Future representing the pending results of the task.
public Future<?>
terminationFuture()

Implements io.netty.util.concurrent.EventExecutorGroup.terminationFuture.

Returns the Future which is notified when all EventExecutors managed by this EventExecutorGroup have been terminated.
private static EventExecutorGroup
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait