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

public abstract Class AbstractScheduledEventExecutor

extends AbstractEventExecutor
Class Inheritance
Known Direct Subclasses
io.netty5.util.concurrent.SingleThreadEventExecutor, io.netty5.util.concurrent.GlobalEventExecutor
Imports
io.netty5.util.internal.DefaultPriorityQueue, .PriorityQueue, .PriorityQueueNode, java.util.Comparator, .Queue, java.util.concurrent.Callable, .TimeUnit

Abstract base class for EventExecutors that want to support scheduling.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
pack-priv static interface

Field Summary

Modifier and TypeField and Description
private static final AbstractScheduledEventExecutor.RunnableScheduledFutureNode<?>[]
private static final Comparator<AbstractScheduledEventExecutor.RunnableScheduledFutureNode<?>>
private PriorityQueue<AbstractScheduledEventExecutor.RunnableScheduledFutureNode<?>>
pack-priv static final long
Inherited from io.netty5.util.concurrent.AbstractEventExecutor:
DEFAULT_SHUTDOWN_QUIET_PERIODDEFAULT_SHUTDOWN_TIMEOUT

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
private <V> void
protected final void
cancelScheduledTasks()

Cancel all scheduled tasks.

pack-priv static long
deadlineNanos(long nanoTime, long delay)

pack-priv static long
protected long
getCurrentTimeNanos()

Get the current time in nanoseconds by this executor's clock.

protected final boolean
hasScheduledTasks()

Returns true if a scheduled task is ready for processing.

protected static long

Returns:

initial value used for delay and computations based upon a monatomic time source.
initialNanoTime
()

The initial value used for delay and computations based upon a monatomic time source.

private static boolean
public static long
nanoTime()

The time elapsed since initialization of this class in nanoseconds.

protected static <V> RunnableScheduledFuture<V>
newRunnableScheduledFuture(AbstractScheduledEventExecutor executor, Promise<V> promise, Callable<V> task, long deadlineNanos, long periodNanos)

Returns a new RunnableFuture build on top of the given Promise and Callable.

protected <V> RunnableScheduledFuture<V>
newScheduledTaskFor(Callable<V> callable, long deadlineNanos, long period)

Returns a RunnableScheduledFuture for the given values.

protected final long
nextScheduledTaskNano()

Return the nanoseconds when the next scheduled task is ready to be run or -1 if no task is scheduled.

pack-priv final RunnableScheduledFuture<?>
protected final RunnableScheduledFuture<?>
protected final RunnableScheduledFuture<?>
pollScheduledTask(long nanoTime)

Return the Runnable which is ready to be executed with the given nanoTime.

pack-priv final void
public Future<Void>
schedule(Runnable
The task that should be executed in this EventExecutorGroup after the given delay.
command
,
long
A positive time delay, in the given time unit.
delay
,
TimeUnit
The non-null time unit for the delay.
unit
)

Implements io.netty5.util.concurrent.EventExecutor.schedule.

Schedule the given task for execution after the given delay, in the next available EventExecutor in this group, and return a future that produces a null result when the task completes.
public <V> Future<V>
schedule(Callable<V>
The task that should be executed in this EventExecutorGroup after the given delay.
callable
,
long
A positive time delay, in the given time unit.
delay
,
TimeUnit
The non-null time unit for the delay.
unit
)

Implements io.netty5.util.concurrent.EventExecutor.schedule.

Schedule the given task for execution after the given delay, in the next available EventExecutor in this group, and return a future that will return the result of the callable when the task completes.
protected final <V> Future<V>
schedule(final RunnableScheduledFuture<V> task)

Add the RunnableScheduledFuture for execution.

public Future<Void>
scheduleAtFixedRate(Runnable
The task that should be scheduled to execute at a fixed rate in this EventExecutorGroup.
command
,
long
The positive initial delay for the first task execution, in terms of the given time unit.
initialDelay
,
long
The positive period for the execution frequency to use after the first execution has started, in terms of the given time unit.
period
,
TimeUnit
The non-null time unit for the delay and period.
unit
)

Implements io.netty5.util.concurrent.EventExecutor.scheduleAtFixedRate.

Schedule the given task for periodic execution in the next available EventExecutor.
pack-priv PriorityQueue<AbstractScheduledEventExecutor.RunnableScheduledFutureNode<?>>
public Future<Void>
scheduleWithFixedDelay(Runnable
The task that should be scheduled to execute with fixed delays in this EventExecutorGroup.
command
,
long
The positive initial delay for the first task execution, in terms of the given time unit.
initialDelay
,
long
The positive subsequent delay between task, to use after the first execution has completed, in terms of the given time unit.
delay
,
TimeUnit
The non-null time unit for the delays.
unit
)

Implements io.netty5.util.concurrent.EventExecutor.scheduleWithFixedDelay.

Schedule the given task for periodic execution in the next available EventExecutor.
Inherited from io.netty5.util.concurrent.AbstractEventExecutor:
newSucceededFuturenewTaskFornewTaskForsafeExecutesubmitsubmitsubmit

Field Detail

EMPTY_RUNNABLE_SCHEDULED_FUTURE_NODESback to summary
private static final AbstractScheduledEventExecutor.RunnableScheduledFutureNode<?>[] EMPTY_RUNNABLE_SCHEDULED_FUTURE_NODES
SCHEDULED_FUTURE_TASK_COMPARATORback to summary
private static final Comparator<AbstractScheduledEventExecutor.RunnableScheduledFutureNode<?>> SCHEDULED_FUTURE_TASK_COMPARATOR
scheduledTaskQueueback to summary
private PriorityQueue<AbstractScheduledEventExecutor.RunnableScheduledFutureNode<?>> scheduledTaskQueue
START_TIMEback to summary
pack-priv static final long START_TIME

Constructor Detail

AbstractScheduledEventExecutorback to summary
protected AbstractScheduledEventExecutor()

Method Detail

add0back to summary
private <V> void add0(RunnableScheduledFuture<V> task)
cancelScheduledTasksback to summary
protected final void cancelScheduledTasks()

Cancel all scheduled tasks.

This method MUST be called only when inEventLoop() is true.

deadlineNanosback to summary
pack-priv static long deadlineNanos(long nanoTime, long delay)
defaultCurrentTimeNanosback to summary
pack-priv static long defaultCurrentTimeNanos()
getCurrentTimeNanosback to summary
protected long getCurrentTimeNanos()

Get the current time in nanoseconds by this executor's clock. This is not the same as System#nanoTime() for two reasons:

  • We apply a fixed offset to the nanoTime
  • Implementations (in particular EmbeddedEventLoop) may use their own time source so they can control time for testing purposes.
hasScheduledTasksback to summary
protected final boolean hasScheduledTasks()

Returns true if a scheduled task is ready for processing.

This method MUST be called only when inEventLoop() is true.

initialNanoTimeback to summary
protected static long initialNanoTime()

The initial value used for delay and computations based upon a monatomic time source.

Returns:long

initial value used for delay and computations based upon a monatomic time source.

isNullOrEmptyback to summary
private static boolean isNullOrEmpty(Queue<AbstractScheduledEventExecutor.RunnableScheduledFutureNode<?>> queue)
nanoTimeback to summary
public static long nanoTime()

The time elapsed since initialization of this class in nanoseconds. This may return a negative number just like System#nanoTime().

newRunnableScheduledFutureback to summary
protected static <V> RunnableScheduledFuture<V> newRunnableScheduledFuture(AbstractScheduledEventExecutor executor, Promise<V> promise, Callable<V> task, long deadlineNanos, long periodNanos)

Returns a new RunnableFuture build on top of the given Promise and Callable.

This can be used if you want to override newScheduledTaskFor(Callable, long, long) and return a different RunnableFuture.

newScheduledTaskForback to summary
protected <V> RunnableScheduledFuture<V> newScheduledTaskFor(Callable<V> callable, long deadlineNanos, long period)

Returns a RunnableScheduledFuture for the given values.

nextScheduledTaskNanoback to summary
protected final long nextScheduledTaskNano()

Return the nanoseconds when the next scheduled task is ready to be run or -1 if no task is scheduled.

This method MUST be called only when inEventLoop() is true.

peekScheduledTaskback to summary
pack-priv final RunnableScheduledFuture<?> peekScheduledTask()
pollScheduledTaskback to summary
protected final RunnableScheduledFuture<?> pollScheduledTask()
See Also
pollScheduledTask(long)
pollScheduledTaskback to summary
protected final RunnableScheduledFuture<?> pollScheduledTask(long nanoTime)

Return the Runnable which is ready to be executed with the given nanoTime. You should use getCurrentTimeNanos() to retrieve the correct nanoTime.

This method MUST be called only when inEventLoop() is true.

removeScheduledback to summary
pack-priv final void removeScheduled(final AbstractScheduledEventExecutor.RunnableScheduledFutureNode<?> task)
scheduleback to summary
public Future<Void> schedule(Runnable command, long delay, TimeUnit unit)

Implements io.netty5.util.concurrent.EventExecutor.schedule.

Doc from io.netty5.util.concurrent.EventExecutorGroup.schedule.

Schedule the given task for execution after the given delay, in the next available EventExecutor in this group, and return a future that produces a null result when the task completes.

Parameters
command:Runnable

The task that should be executed in this EventExecutorGroup after the given delay.

delay:long

A positive time delay, in the given time unit.

unit:TimeUnit

The non-null time unit for the delay.

Returns:Future<Void>

A future that represents the completion of the scheduled task.

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

Implements io.netty5.util.concurrent.EventExecutor.schedule.

Doc from io.netty5.util.concurrent.EventExecutorGroup.schedule.

Schedule the given task for execution after the given delay, in the next available EventExecutor in this group, and return a future that will return the result of the callable when the task completes.

Parameters
<V>
The type of the future result.
callable:Callable<V>

The task that should be executed in this EventExecutorGroup after the given delay.

delay:long

A positive time delay, in the given time unit.

unit:TimeUnit

The non-null time unit for the delay.

Returns:Future<V>

A future that represents the completion of the scheduled task.

Annotations
@Override
scheduleback to summary
protected final <V> Future<V> schedule(final RunnableScheduledFuture<V> task)

Add the RunnableScheduledFuture for execution.

scheduleAtFixedRateback to summary
public Future<Void> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)

Implements io.netty5.util.concurrent.EventExecutor.scheduleAtFixedRate.

Doc from io.netty5.util.concurrent.EventExecutorGroup.scheduleAtFixedRate.

Schedule the given task for periodic execution in the next available EventExecutor. The first execution will occur after the given initial delay, and the following repeated executions will occur with the given period of time between each execution is started. If the task takes longer to complete than the requested period, then the following executions will be delayed, rather than allowing multiple instances of the task to run concurrently.

The task will be executed repeatedly until it either fails with an exception, or its future is cancelled. The future thus will never complete successfully.

Parameters
command:Runnable

The task that should be scheduled to execute at a fixed rate in this EventExecutorGroup.

initialDelay:long

The positive initial delay for the first task execution, in terms of the given time unit.

period:long

The positive period for the execution frequency to use after the first execution has started, in terms of the given time unit.

unit:TimeUnit

The non-null time unit for the delay and period.

Returns:Future<Void>

A future that represents the recurring task, and which can be cancelled to stop future executions.

Annotations
@Override
scheduledTaskQueueback to summary
pack-priv PriorityQueue<AbstractScheduledEventExecutor.RunnableScheduledFutureNode<?>> scheduledTaskQueue()
scheduleWithFixedDelayback to summary
public Future<Void> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)

Implements io.netty5.util.concurrent.EventExecutor.scheduleWithFixedDelay.

Doc from io.netty5.util.concurrent.EventExecutorGroup.scheduleWithFixedDelay.

Schedule the given task for periodic execution in the next available EventExecutor. The first execution will occur after the given initial delay, and the following repeated executions will occur with the given subsequent delay between one task completing and the next task starting. The delay from the completion of one task, to the start of the next, stays unchanged regardless of how long a task takes to complete.

This is in contrast to scheduleAtFixedRate(Runnable, long, long, TimeUnit) which varies the delays between the tasks in order to hit a given frequency.

The task will be executed repeatedly until it either fails with an exception, or its future is cancelled. The future thus will never complete successfully.

Parameters
command:Runnable

The task that should be scheduled to execute with fixed delays in this EventExecutorGroup.

initialDelay:long

The positive initial delay for the first task execution, in terms of the given time unit.

delay:long

The positive subsequent delay between task, to use after the first execution has completed, in terms of the given time unit.

unit:TimeUnit

The non-null time unit for the delays.

Returns:Future<Void>

A future that represents the recurring task, and which can be cancelled to stop future executions.

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

private final Class AbstractScheduledEventExecutor.DefaultRunnableScheduledFutureNode<V>

extends Object
implements AbstractScheduledEventExecutor.RunnableScheduledFutureNode<V>
Class Inheritance
  • java.lang.Object
  • io.netty5.util.concurrent.AbstractScheduledEventExecutor.DefaultRunnableScheduledFutureNode
All Implemented Interfaces
io.netty5.util.concurrent.AbstractScheduledEventExecutor.RunnableScheduledFutureNode, io.netty5.util.concurrent.RunnableScheduledFuture, java.lang.Comparable, io.netty5.util.concurrent.RunnableFuture, io.netty5.util.concurrent.Future, io.netty5.util.concurrent.AsynchronousResult, java.lang.Runnable, io.netty5.util.internal.PriorityQueueNode

Field Summary

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

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public RunnableScheduledFuture<V>
addListener(FutureListener<? super V>
The listener to be called when this future completes. The listener will be passed this future as an argument.
listener
)

Implements io.netty5.util.concurrent.RunnableScheduledFuture.addListener.

Adds the specified listener to this future.
public <C> RunnableScheduledFuture<V>
addListener(C
The context object that will be passed to the listener when this future completes.
context
,
FutureContextListener<? super C, ? super V>
The listener to be called when this future completes. The listener will be passed the given context, and this future.
listener
)

Implements io.netty5.util.concurrent.RunnableScheduledFuture.addListener.

Adds the specified listener to this future.
public FutureCompletionStage<V>
asStage()

Implements io.netty5.util.concurrent.Future.asStage.

Returns a FutureCompletionStage that reflects the state of this Future and so will receive all updates as well.
public boolean
cancel()

Implements io.netty5.util.concurrent.AsynchronousResult.cancel.

Cancel this asynchronous operation, unless it has already been completed or is not cancellable.
public Throwable
cause()

Implements io.netty5.util.concurrent.AsynchronousResult.cause.

Returns the cause of the failed operation if the operation has failed.
public int
compareTo(RunnableScheduledFuture<?>
the object to be compared.
o
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.
public long
deadlineNanos()

Implements io.netty5.util.concurrent.RunnableScheduledFuture.deadlineNanos.

Returns the deadline in nanos when the run() method should be called again.
public long
delayNanos()

Implements io.netty5.util.concurrent.RunnableScheduledFuture.delayNanos.

Returns the delay in nanos when the run() method should be called again.
public long
delayNanos(long currentTimeNanos)

Implements io.netty5.util.concurrent.RunnableScheduledFuture.delayNanos.

Returns the delay in nanos (taking the given currentTimeNanos into account) when the run() method should be called again.
public EventExecutor
public V
getNow()

Implements io.netty5.util.concurrent.AsynchronousResult.getNow.

Return the successful result of this asynchronous operation, if any.
public boolean
isCancellable()

Implements io.netty5.util.concurrent.AsynchronousResult.isCancellable.

Returns true if and only if the operation can be cancelled via cancel().
public boolean
isCancelled()

Implements io.netty5.util.concurrent.AsynchronousResult.isCancelled.

Return true if this operation has been cancelled.
public boolean
isDone()

Implements io.netty5.util.concurrent.AsynchronousResult.isDone.

Return true if this operation has been completed either successfully, unsuccessfully, or through cancellation.
public boolean
isFailed()

Implements io.netty5.util.concurrent.AsynchronousResult.isFailed.

Returns true if and only if the operation was completed and failed.
public boolean
isPeriodic()

Implements io.netty5.util.concurrent.RunnableScheduledFuture.isPeriodic.

Return true if the task is periodic, which means it may be executed multiple times, as opposed to a delayed task or a normal task, that only execute once.
public boolean
isSuccess()

Implements io.netty5.util.concurrent.AsynchronousResult.isSuccess.

Returns true if and only if the operation was completed successfully.
public int
public void
priorityQueueIndex(DefaultPriorityQueue<?>
The queue for which the index is being set.
queue
,
int
The index as used by DefaultPriorityQueue.
i
)

Implements io.netty5.util.internal.PriorityQueueNode.priorityQueueIndex.

Used by DefaultPriorityQueue to maintain state for an element in the queue.
public void
run()

Implements java.lang.Runnable.run.

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

Field Detail

futureback to summary
private final RunnableScheduledFuture<V> future
queueIndexback to summary
private int queueIndex

Constructor Detail

DefaultRunnableScheduledFutureNodeback to summary
pack-priv DefaultRunnableScheduledFutureNode(RunnableScheduledFuture<V> future)

Method Detail

addListenerback to summary
public RunnableScheduledFuture<V> addListener(FutureListener<? super V> listener)

Implements io.netty5.util.concurrent.RunnableScheduledFuture.addListener.

Doc from io.netty5.util.concurrent.Future.addListener.

Adds the specified listener to this future. The specified listener is notified when this future is done. If this future is already completed, the specified listener is notified immediately.

Parameters
listener:FutureListener<? super V>

The listener to be called when this future completes. The listener will be passed this future as an argument.

Returns:RunnableScheduledFuture<V>

this future object.

Annotations
@Override
addListenerback to summary
public <C> RunnableScheduledFuture<V> addListener(C context, FutureContextListener<? super C, ? super V> listener)

Implements io.netty5.util.concurrent.RunnableScheduledFuture.addListener.

Doc from io.netty5.util.concurrent.Future.addListener.

Adds the specified listener to this future. The specified listener is notified when this future is done. If this future is already completed, the specified listener is notified immediately.

Parameters
context:C

The context object that will be passed to the listener when this future completes.

listener:FutureContextListener<? super C, ? super V>

The listener to be called when this future completes. The listener will be passed the given context, and this future.

Returns:RunnableScheduledFuture<V>

this future object.

Annotations
@Override
asStageback to summary
public FutureCompletionStage<V> asStage()

Implements io.netty5.util.concurrent.Future.asStage.

Doc from io.netty5.util.concurrent.Future.asStage.

Returns a FutureCompletionStage that reflects the state of this Future and so will receive all updates as well.

The returned FutureCompletionStage also implements the JDK java.util.concurrent.Future, and has blocking methods not found on the Netty Future interface, for awaiting the completion.

Annotations
@Override
cancelback to summary
public boolean cancel()

Implements io.netty5.util.concurrent.AsynchronousResult.cancel.

Doc from io.netty5.util.concurrent.AsynchronousResult.cancel.

Cancel this asynchronous operation, unless it has already been completed or is not cancellable.

A cancelled operation is considered to be done and failed.

If the cancellation was successful, the result of this operation will be that it has failed with a CancellationException.

Cancellation will not cause any threads working on the operation to be interrupted.

Returns:boolean

true if the operation was cancelled by this call, otherwise false.

Annotations
@Override
causeback to summary
public Throwable cause()

Implements io.netty5.util.concurrent.AsynchronousResult.cause.

Doc from io.netty5.util.concurrent.AsynchronousResult.cause.

Returns the cause of the failed operation if the operation has failed.

Returns:Throwable

The cause of the failure, if any. Otherwise null if succeeded.

Annotations
@Override
compareToback to summary
public int compareTo(RunnableScheduledFuture<?> 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:RunnableScheduledFuture<?>

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
deadlineNanosback to summary
public long deadlineNanos()

Implements io.netty5.util.concurrent.RunnableScheduledFuture.deadlineNanos.

Doc from io.netty5.util.concurrent.RunnableScheduledFuture.deadlineNanos.

Returns the deadline in nanos when the run() method should be called again.

Annotations
@Override
delayNanosback to summary
public long delayNanos()

Implements io.netty5.util.concurrent.RunnableScheduledFuture.delayNanos.

Doc from io.netty5.util.concurrent.RunnableScheduledFuture.delayNanos.

Returns the delay in nanos when the run() method should be called again.

Annotations
@Override
delayNanosback to summary
public long delayNanos(long currentTimeNanos)

Implements io.netty5.util.concurrent.RunnableScheduledFuture.delayNanos.

Doc from io.netty5.util.concurrent.RunnableScheduledFuture.delayNanos.

Returns the delay in nanos (taking the given currentTimeNanos into account) when the run() method should be called again.

Annotations
@Override
executorback to summary
public EventExecutor executor()

Implements io.netty5.util.concurrent.AsynchronousResult.executor.

Doc from io.netty5.util.concurrent.AsynchronousResult.executor.

Returns the EventExecutor that is tied to this Promise or Future.

Annotations
@Override
getNowback to summary
public V getNow()

Implements io.netty5.util.concurrent.AsynchronousResult.getNow.

Doc from io.netty5.util.concurrent.AsynchronousResult.getNow.

Return the successful result of this asynchronous operation, if any. If the operation has not yet been completed, then this will throw IllegalStateException. If the operation has been cancelled or failed with an exception, then this returns null. Note that asynchronous operations can also be completed successfully with a null result.

Returns:V

the result of this operation, if completed successfully.

Annotations
@Override
isCancellableback to summary
public boolean isCancellable()

Implements io.netty5.util.concurrent.AsynchronousResult.isCancellable.

Doc from io.netty5.util.concurrent.AsynchronousResult.isCancellable.

Returns true if and only if the operation can be cancelled via cancel(). Note that this is inherently racy, as the operation could be made uncancellable at any time.

Returns:boolean

true if this operation can be cancelled.

Annotations
@Override
isCancelledback to summary
public boolean isCancelled()

Implements io.netty5.util.concurrent.AsynchronousResult.isCancelled.

Doc from io.netty5.util.concurrent.AsynchronousResult.isCancelled.

Return true if this operation has been cancelled.

Returns:boolean

true if this operation has been cancelled, otherwise false.

Annotations
@Override
isDoneback to summary
public boolean isDone()

Implements io.netty5.util.concurrent.AsynchronousResult.isDone.

Doc from io.netty5.util.concurrent.AsynchronousResult.isDone.

Return true if this operation has been completed either successfully, unsuccessfully, or through cancellation.

Returns:boolean

true if this operation has completed, otherwise false.

Annotations
@Override
isFailedback to summary
public boolean isFailed()

Implements io.netty5.util.concurrent.AsynchronousResult.isFailed.

Doc from io.netty5.util.concurrent.AsynchronousResult.isFailed.

Returns true if and only if the operation was completed and failed.

Annotations
@Override
isPeriodicback to summary
public boolean isPeriodic()

Implements io.netty5.util.concurrent.RunnableScheduledFuture.isPeriodic.

Doc from io.netty5.util.concurrent.RunnableScheduledFuture.isPeriodic.

Return true if the task is periodic, which means it may be executed multiple times, as opposed to a delayed task or a normal task, that only execute once.

Returns:boolean

true if this task is periodic, otherwise false.

Annotations
@Override
isSuccessback to summary
public boolean isSuccess()

Implements io.netty5.util.concurrent.AsynchronousResult.isSuccess.

Doc from io.netty5.util.concurrent.AsynchronousResult.isSuccess.

Returns true if and only if the operation was completed successfully.

Annotations
@Override
priorityQueueIndexback to summary
public int priorityQueueIndex(DefaultPriorityQueue<?> queue)

Implements io.netty5.util.internal.PriorityQueueNode.priorityQueueIndex.

Doc from io.netty5.util.internal.PriorityQueueNode.priorityQueueIndex.

Get the last value set by priorityQueueIndex(DefaultPriorityQueue, int) for the value corresponding to queue.

Throwing exceptions from this method will result in undefined behavior.

Annotations
@Override
priorityQueueIndexback to summary
public void priorityQueueIndex(DefaultPriorityQueue<?> queue, int i)

Implements io.netty5.util.internal.PriorityQueueNode.priorityQueueIndex.

Doc from io.netty5.util.internal.PriorityQueueNode.priorityQueueIndex.

Used by DefaultPriorityQueue to maintain state for an element in the queue.

Throwing exceptions from this method will result in undefined behavior.

Parameters
queue:DefaultPriorityQueue<?>

The queue for which the index is being set.

i:int

The index as used by DefaultPriorityQueue.

Annotations
@Override
runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

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

pack-priv Interface AbstractScheduledEventExecutor.RunnableScheduledFutureNode<V>

extends PriorityQueueNode, RunnableScheduledFuture<V>
Known Direct Implementers
io.netty5.util.concurrent.AbstractScheduledEventExecutor.DefaultRunnableScheduledFutureNode, io.netty5.util.concurrent.RunnableScheduledFutureAdapter

Field Summary

Inherited from io.netty5.util.internal.PriorityQueueNode:
INDEX_NOT_IN_QUEUE

Method Summary

Inherited from io.netty5.util.concurrent.RunnableScheduledFuture:
addListeneraddListenerdeadlineNanosdelayNanosdelayNanosisPeriodic
Inherited from io.netty5.util.internal.PriorityQueueNode:
priorityQueueIndexpriorityQueueIndex