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

public final Class UnorderedThreadPoolEventExecutor

extends ScheduledThreadPoolExecutor
implements EventExecutor
Class Inheritance
All Implemented Interfaces
io.netty.util.concurrent.EventExecutor, io.netty.util.concurrent.EventExecutorGroup, java.lang.Iterable, java.util.concurrent.ScheduledExecutorService, java.util.concurrent.ExecutorService, java.lang.AutoCloseable, java.util.concurrent.Executor
Imports
io.netty.util.internal.logging.InternalLogger, .InternalLoggerFactory, java.util.Collections, .Iterator, .List, .Set, java.util.concurrent.Callable, .Delayed, .ExecutionException, .RejectedExecutionHandler, .RunnableScheduledFuture, .ScheduledThreadPoolExecutor, .ThreadFactory, .TimeUnit

EventExecutor implementation which makes no guarantees about the ordering of task execution that are submitted because there may be multiple threads executing these tasks. This implementation is most useful for protocols that do not need strict ordering. Because it provides no ordering care should be taken when using it!

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
private final Set<EventExecutor>
private static final InternalLogger
private final Promise<?>

Constructor Summary

AccessConstructor and Description
public
public
public
public

Method Summary

Modifier and TypeMethod and Description
protected <V> RunnableScheduledFuture<V>
decorateTask(Runnable
the submitted Runnable
runnable
,
RunnableScheduledFuture<V>
the task created to execute the runnable
task
)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.decorateTask.

Modifies or replaces the task used to execute a runnable.
protected <V> RunnableScheduledFuture<V>
decorateTask(Callable<V>
the submitted Callable
callable
,
RunnableScheduledFuture<V>
the task created to execute the callable
task
)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.decorateTask.

Modifies or replaces the task used to execute a callable.
public void
execute(Runnable
the runnable task
command
)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.execute.

Implements java.util.concurrent.Executor.execute.

Executes the given command at some time in the future.
public boolean
public boolean
inEventLoop(Thread thread)

Implements io.netty.util.concurrent.EventExecutor.inEventLoop.

Return true if the given Thread is executed in the event loop, false otherwise.
public boolean
public Iterator<EventExecutor>
iterator()

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

Returns an iterator over elements of type T.
public <V> Future<V>
newFailedFuture(Throwable cause)

Implements io.netty.util.concurrent.EventExecutor.newFailedFuture.

Create a new Future which is marked as failed already.
public <V> ProgressivePromise<V>
public <V> Promise<V>
public <V> Future<V>
newSucceededFuture(V result)

Implements io.netty.util.concurrent.EventExecutor.newSucceededFuture.

Create a new Future which is marked as succeeded already.
public EventExecutor
next()

Implements io.netty.util.concurrent.EventExecutor.next.

Returns a reference to itself.
public EventExecutorGroup
parent()

Implements io.netty.util.concurrent.EventExecutor.parent.

Return the EventExecutorGroup which is the parent of this 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
)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.schedule.

Implements io.netty.util.concurrent.EventExecutorGroup.schedule, java.util.concurrent.ScheduledExecutorService.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
)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.schedule.

Implements io.netty.util.concurrent.EventExecutorGroup.schedule, java.util.concurrent.ScheduledExecutorService.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
)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.scheduleAtFixedRate.

Implements io.netty.util.concurrent.EventExecutorGroup.scheduleAtFixedRate, java.util.concurrent.ScheduledExecutorService.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
)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay.

Implements io.netty.util.concurrent.EventExecutorGroup.scheduleWithFixedDelay, java.util.concurrent.ScheduledExecutorService.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()

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.shutdown.

Implements io.netty.util.concurrent.EventExecutorGroup.shutdown, java.util.concurrent.ExecutorService.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()

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.shutdownNow.

Implements io.netty.util.concurrent.EventExecutorGroup.shutdownNow, java.util.concurrent.ExecutorService.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
)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.submit.

Implements io.netty.util.concurrent.EventExecutorGroup.submit, java.util.concurrent.ExecutorService.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
)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.submit.

Implements io.netty.util.concurrent.EventExecutorGroup.submit, java.util.concurrent.ExecutorService.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
)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.submit.

Implements io.netty.util.concurrent.EventExecutorGroup.submit, java.util.concurrent.ExecutorService.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.
Inherited from java.util.concurrent.ScheduledThreadPoolExecutor:
getContinueExistingPeriodicTasksAfterShutdownPolicygetExecuteExistingDelayedTasksAfterShutdownPolicygetQueuegetRemoveOnCancelPolicysetContinueExistingPeriodicTasksAfterShutdownPolicysetExecuteExistingDelayedTasksAfterShutdownPolicysetRemoveOnCancelPolicy

Field Detail

executorSetback to summary
private final Set<EventExecutor> executorSet
loggerback to summary
private static final InternalLogger logger
terminationFutureback to summary
private final Promise<?> terminationFuture

Constructor Detail

UnorderedThreadPoolEventExecutorback to summary
public UnorderedThreadPoolEventExecutor(int corePoolSize)

Calls UnorderedThreadPoolEventExecutor#UnorderedThreadPoolEventExecutor(int, ThreadFactory) using DefaultThreadFactory.

UnorderedThreadPoolEventExecutorback to summary
public UnorderedThreadPoolEventExecutor(int corePoolSize, ThreadFactory threadFactory)

See ScheduledThreadPoolExecutor#ScheduledThreadPoolExecutor(int, ThreadFactory)

UnorderedThreadPoolEventExecutorback to summary
public UnorderedThreadPoolEventExecutor(int corePoolSize, RejectedExecutionHandler handler)

Calls UnorderedThreadPoolEventExecutor#UnorderedThreadPoolEventExecutor(int, ThreadFactory, java.util.concurrent.RejectedExecutionHandler) using DefaultThreadFactory.

UnorderedThreadPoolEventExecutorback to summary
public UnorderedThreadPoolEventExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler)

See ScheduledThreadPoolExecutor#ScheduledThreadPoolExecutor(int, ThreadFactory, RejectedExecutionHandler)

Method Detail

decorateTaskback to summary
protected <V> RunnableScheduledFuture<V> decorateTask(Runnable runnable, RunnableScheduledFuture<V> task)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.decorateTask.

Doc from java.util.concurrent.ScheduledThreadPoolExecutor.decorateTask.

Modifies or replaces the task used to execute a runnable. This method can be used to override the concrete class used for managing internal tasks. The default implementation simply returns the given task.

Parameters
<V>
the type of the task's result
runnable:Runnable

the submitted Runnable

task:RunnableScheduledFuture<V>

the task created to execute the runnable

Returns:RunnableScheduledFuture<V>

a task that can execute the runnable

Annotations
@Override
decorateTaskback to summary
protected <V> RunnableScheduledFuture<V> decorateTask(Callable<V> callable, RunnableScheduledFuture<V> task)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.decorateTask.

Doc from java.util.concurrent.ScheduledThreadPoolExecutor.decorateTask.

Modifies or replaces the task used to execute a callable. This method can be used to override the concrete class used for managing internal tasks. The default implementation simply returns the given task.

Parameters
<V>
the type of the task's result
callable:Callable<V>

the submitted Callable

task:RunnableScheduledFuture<V>

the task created to execute the callable

Returns:RunnableScheduledFuture<V>

a task that can execute the callable

Annotations
@Override
executeback to summary
public void execute(Runnable command)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.execute.

Implements java.util.concurrent.Executor.execute.

Doc from java.util.concurrent.Executor.execute.

Executes the given command at some time in the future. The command may execute in a new thread, in a pooled thread, or in the calling thread, at the discretion of the Executor implementation.

Parameters
command:Runnable

the runnable task

Annotations
@Override
inEventLoopback to summary
public boolean inEventLoop()

Implements io.netty.util.concurrent.EventExecutor.inEventLoop.

Doc from io.netty.util.concurrent.EventExecutor.inEventLoop.

Calls inEventLoop(Thread) with Thread#currentThread() as argument

Annotations
@Override
inEventLoopback to summary
public boolean inEventLoop(Thread thread)

Implements io.netty.util.concurrent.EventExecutor.inEventLoop.

Doc from io.netty.util.concurrent.EventExecutor.inEventLoop.

Return true if the given Thread is executed in the event loop, false otherwise.

Annotations
@Override
isShuttingDownback to summary
public boolean isShuttingDown()

Implements io.netty.util.concurrent.EventExecutorGroup.isShuttingDown.

Doc from io.netty.util.concurrent.EventExecutorGroup.isShuttingDown.

Returns true if and only if all EventExecutors managed by this EventExecutorGroup are being shut down gracefully or was shut down.

Annotations
@Override
iteratorback to summary
public Iterator<EventExecutor> iterator()

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

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<EventExecutor>

an Iterator.

Annotations
@Override
newFailedFutureback to summary
public <V> Future<V> newFailedFuture(Throwable cause)

Implements io.netty.util.concurrent.EventExecutor.newFailedFuture.

Doc from io.netty.util.concurrent.EventExecutor.newFailedFuture.

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.

Annotations
@Override
newProgressivePromiseback to summary
public <V> ProgressivePromise<V> newProgressivePromise()

Implements io.netty.util.concurrent.EventExecutor.newProgressivePromise.

Doc from io.netty.util.concurrent.EventExecutor.newProgressivePromise.

Create a new ProgressivePromise.

Annotations
@Override
newPromiseback to summary
public <V> Promise<V> newPromise()

Implements io.netty.util.concurrent.EventExecutor.newPromise.

Doc from io.netty.util.concurrent.EventExecutor.newPromise.

Return a new Promise.

Annotations
@Override
newSucceededFutureback to summary
public <V> Future<V> newSucceededFuture(V result)

Implements io.netty.util.concurrent.EventExecutor.newSucceededFuture.

Doc from io.netty.util.concurrent.EventExecutor.newSucceededFuture.

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.

Annotations
@Override
nextback to summary
public EventExecutor next()

Implements io.netty.util.concurrent.EventExecutor.next.

Doc from io.netty.util.concurrent.EventExecutor.next.

Returns a reference to itself.

Annotations
@Override
parentback to summary
public EventExecutorGroup parent()

Implements io.netty.util.concurrent.EventExecutor.parent.

Doc from io.netty.util.concurrent.EventExecutor.parent.

Return the EventExecutorGroup which is the parent of this EventExecutor,

Annotations
@Override
scheduleback to summary
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.schedule.

Implements io.netty.util.concurrent.EventExecutorGroup.schedule, java.util.concurrent.ScheduledExecutorService.schedule.

Doc from java.util.concurrent.ScheduledExecutorService.schedule.

Submits a one-shot task that becomes enabled after the given delay.

Parameters
command:Runnable

the task to execute

delay:long

the time from now to delay execution

unit:TimeUnit

the time unit of the delay parameter

Returns:ScheduledFuture<?>

a ScheduledFuture representing pending completion of the task and whose get() method will return null upon completion

Annotations
@Override
scheduleback to summary
public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.schedule.

Implements io.netty.util.concurrent.EventExecutorGroup.schedule, java.util.concurrent.ScheduledExecutorService.schedule.

Doc from java.util.concurrent.ScheduledExecutorService.schedule.

Submits a value-returning one-shot task that becomes enabled after the given delay.

Parameters
<V>
the type of the callable's result
callable:Callable<V>

the function to execute

delay:long

the time from now to delay execution

unit:TimeUnit

the time unit of the delay parameter

Returns:ScheduledFuture<V>

a ScheduledFuture that can be used to extract result or cancel

Annotations
@Override
scheduleAtFixedRateback to summary
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.scheduleAtFixedRate.

Implements io.netty.util.concurrent.EventExecutorGroup.scheduleAtFixedRate, java.util.concurrent.ScheduledExecutorService.scheduleAtFixedRate.

Doc from java.util.concurrent.ScheduledExecutorService.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.

The sequence of task executions continues indefinitely until one of the following exceptional completions occur:

  • The task is explicitly cancelled via the returned future.
  • The executor terminates, also resulting in task cancellation.
  • An execution of the task throws an exception. In this case calling get on the returned future will throw ExecutionException, holding the exception as its cause.
Subsequent executions are suppressed. Subsequent calls to isDone() on the returned future will return true.

If any execution of this task takes longer than its period, then subsequent executions may start late, but will not concurrently execute.

Parameters
command:Runnable

the task to execute

initialDelay:long

the time to delay first execution

period:long

the period between successive executions

unit:TimeUnit

the time unit of the initialDelay and period parameters

Returns:ScheduledFuture<?>

a ScheduledFuture representing pending completion of the series of repeated tasks. The future's get() method will never return normally, and will throw an exception upon task cancellation or abnormal termination of a task execution.

Annotations
@Override
scheduleWithFixedDelayback to summary
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay.

Implements io.netty.util.concurrent.EventExecutorGroup.scheduleWithFixedDelay, java.util.concurrent.ScheduledExecutorService.scheduleWithFixedDelay.

Doc from java.util.concurrent.ScheduledExecutorService.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.

The sequence of task executions continues indefinitely until one of the following exceptional completions occur:

  • The task is explicitly cancelled via the returned future.
  • The executor terminates, also resulting in task cancellation.
  • An execution of the task throws an exception. In this case calling get on the returned future will throw ExecutionException, holding the exception as its cause.
Subsequent executions are suppressed. Subsequent calls to isDone() on the returned future will return true.
Parameters
command:Runnable

the task to execute

initialDelay:long

the time to delay first execution

delay:long

the delay between the termination of one execution and the commencement of the next

unit:TimeUnit

the time unit of the initialDelay and delay parameters

Returns:ScheduledFuture<?>

a ScheduledFuture representing pending completion of the series of repeated tasks. The future's get() method will never return normally, and will throw an exception upon task cancellation or abnormal termination of a task execution.

Annotations
@Override
shutdownback to summary
public void shutdown()

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.shutdown.

Implements io.netty.util.concurrent.EventExecutorGroup.shutdown, java.util.concurrent.ExecutorService.shutdown.

Doc from java.util.concurrent.ExecutorService.shutdown.

Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted. Invocation has no additional effect if already shut down.

This method does not wait for previously submitted tasks to complete execution. Use awaitTermination to do that.

Annotations
@Override
shutdownGracefullyback to summary
public Future<?> shutdownGracefully()

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

Doc from io.netty.util.concurrent.EventExecutorGroup.shutdownGracefully.

Shortcut method for shutdownGracefully(long, long, TimeUnit) with sensible default values.

Returns:Future<?>

the terminationFuture()

Annotations
@Override
shutdownGracefullyback to summary
public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit)

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

Doc from io.netty.util.concurrent.EventExecutorGroup.shutdownGracefully.

Signals this executor that the caller wants the executor to be shut down. Once this method is called, isShuttingDown() starts to return true, and the executor prepares to shut itself down. Unlike shutdown(), graceful shutdown ensures that no tasks are submitted for 'the quiet period' (usually a couple seconds) before it shuts itself down. If a task is submitted during the quiet period, it is guaranteed to be accepted and the quiet period will start over.

Parameters
quietPeriod:long

the quiet period as described in the documentation

timeout:long

the maximum amount of time to wait until the executor is shutdown() regardless if a task was submitted during the quiet period

unit:TimeUnit

the unit of quietPeriod and timeout

Returns:Future<?>

the terminationFuture()

Annotations
@Override
shutdownNowback to summary
public List<Runnable> shutdownNow()

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.shutdownNow.

Implements io.netty.util.concurrent.EventExecutorGroup.shutdownNow, java.util.concurrent.ExecutorService.shutdownNow.

Doc from java.util.concurrent.ExecutorService.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.

This method does not wait for actively executing tasks to terminate. Use awaitTermination to do that.

There are no guarantees beyond best-effort attempts to stop processing actively executing tasks. For example, typical implementations will cancel via Thread#interrupt, so any task that fails to respond to interrupts may never terminate.

Returns:List<Runnable>

list of tasks that never commenced execution

Annotations
@Override
submitback to summary
public Future<?> submit(Runnable task)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.submit.

Implements io.netty.util.concurrent.EventExecutorGroup.submit, java.util.concurrent.ExecutorService.submit.

Doc from java.util.concurrent.ExecutorService.submit.

Submits a Runnable task for execution and returns a Future representing that task. The Future's get method will return null upon successful completion.

Parameters
task:Runnable

the task to submit

Returns:Future<?>

a Future representing pending completion of the task

Annotations
@Override
submitback to summary
public <T> Future<T> submit(Runnable task, T result)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.submit.

Implements io.netty.util.concurrent.EventExecutorGroup.submit, java.util.concurrent.ExecutorService.submit.

Doc from java.util.concurrent.ExecutorService.submit.

Submits a Runnable task for execution and returns a Future representing that task. The Future's get method will return the given result upon successful completion.

Parameters
<T>
the type of the result
task:Runnable

the task to submit

result:T

the result to return

Returns:Future<T>

a Future representing pending completion of the task

Annotations
@Override
submitback to summary
public <T> Future<T> submit(Callable<T> task)

Overrides java.util.concurrent.ScheduledThreadPoolExecutor.submit.

Implements io.netty.util.concurrent.EventExecutorGroup.submit, java.util.concurrent.ExecutorService.submit.

Doc from java.util.concurrent.ExecutorService.submit.

Submits a value-returning task for execution and returns a Future representing the pending results of the task. The Future's get method will return the task's result upon successful completion.

If you would like to immediately block waiting for a task, you can use constructions of the form result = exec.submit(aCallable).get();

Note

The Executors class includes a set of methods that can convert some other common closure-like objects, for example, java.security.PrivilegedAction to Callable form so they can be submitted.

Parameters
<T>
the type of the task's result
task:Callable<T>

the task to submit

Returns:Future<T>

a Future representing pending completion of the task

Annotations
@Override
terminationFutureback to summary
public Future<?> terminationFuture()

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

Doc from io.netty.util.concurrent.EventExecutorGroup.terminationFuture.

Returns the Future which is notified when all EventExecutors managed by this EventExecutorGroup have been terminated.

Annotations
@Override
io.netty.util.concurrent back to summary

private final Class UnorderedThreadPoolEventExecutor.NonNotifyRunnable

extends Object
implements Runnable
Class Inheritance
  • java.lang.Object
  • io.netty.util.concurrent.UnorderedThreadPoolEventExecutor.NonNotifyRunnable
All Implemented Interfaces
java.lang.Runnable

Field Summary

Modifier and TypeField and Description
private final Runnable

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

taskback to summary
private final Runnable task

Constructor Detail

NonNotifyRunnableback to summary
pack-priv NonNotifyRunnable(Runnable task)

Method Detail

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override
io.netty.util.concurrent back to summary

private final Class UnorderedThreadPoolEventExecutor.RunnableScheduledFutureTask<V>

extends PromiseTask<V>
implements RunnableScheduledFuture<V>, ScheduledFuture<V>
Class Inheritance
All Implemented Interfaces
io.netty.util.concurrent.ScheduledFuture, java.util.concurrent.ScheduledFuture, java.util.concurrent.Future, java.util.concurrent.Delayed, java.lang.Comparable, io.netty.util.concurrent.Future, java.util.concurrent.RunnableScheduledFuture, java.util.concurrent.RunnableFuture, java.lang.Runnable

Field Summary

Modifier and TypeField and Description
private final RunnableScheduledFuture<V>
private final boolean

Constructor Summary

AccessConstructor and Description
pack-priv
RunnableScheduledFutureTask(EventExecutor executor, RunnableScheduledFuture<V> future, boolean wasCallable)

Method Summary

Modifier and TypeMethod and Description
public int
compareTo(Delayed
the object to be compared.
o
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.
public long
getDelay(TimeUnit
the time unit
unit
)

Implements java.util.concurrent.Delayed.getDelay.

Returns the remaining delay associated with this object, in the given time unit.
public boolean
isPeriodic()

Implements java.util.concurrent.RunnableScheduledFuture.isPeriodic.

Returns true if this task is periodic.
public void
run()

Overrides io.netty.util.concurrent.PromiseTask.run.

Implements java.util.concurrent.RunnableFuture.run.

Sets this Future to the result of its computation unless it has been cancelled.
pack-priv V
Inherited from io.netty.util.concurrent.PromiseTask:
cancelequalshashCodesetFailuresetFailureInternalsetSuccesssetSuccessInternalsetUncancellablesetUncancellableInternaltoStringBuildertryFailuretryFailureInternaltrySuccesstrySuccessInternal

Field Detail

futureback to summary
private final RunnableScheduledFuture<V> future
wasCallableback to summary
private final boolean wasCallable

Constructor Detail

RunnableScheduledFutureTaskback to summary
pack-priv RunnableScheduledFutureTask(EventExecutor executor, RunnableScheduledFuture<V> future, boolean wasCallable)

Method Detail

compareToback to summary
public int compareTo(Delayed o)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
o:Delayed

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
getDelayback to summary
public long getDelay(TimeUnit unit)

Implements java.util.concurrent.Delayed.getDelay.

Doc from java.util.concurrent.Delayed.getDelay.

Returns the remaining delay associated with this object, in the given time unit.

Parameters
unit:TimeUnit

the time unit

Returns:long

the remaining delay; zero or negative values indicate that the delay has already elapsed

Annotations
@Override
isPeriodicback to summary
public boolean isPeriodic()

Implements java.util.concurrent.RunnableScheduledFuture.isPeriodic.

Doc from java.util.concurrent.RunnableScheduledFuture.isPeriodic.

Returns true if this task is periodic. A periodic task may re-run according to some schedule. A non-periodic task can be run only once.

Returns:boolean

true if this task is periodic

Annotations
@Override
runback to summary
public void run()

Overrides io.netty.util.concurrent.PromiseTask.run.

Implements java.util.concurrent.RunnableFuture.run.

Doc from java.util.concurrent.RunnableFuture.run.

Sets this Future to the result of its computation unless it has been cancelled.

Annotations
@Override
runTaskback to summary
pack-priv V runTask() throws Throwable

Overrides io.netty.util.concurrent.PromiseTask.runTask.

Annotations
@Override