Top Description Methods
io.netty5.util.concurrent

public Interface RunnableScheduledFuture<V>

extends RunnableFuture<V>, Comparable<RunnableScheduledFuture<?>>
Known Direct Subinterfaces
io.netty5.util.concurrent.AbstractScheduledEventExecutor.RunnableScheduledFutureNode

A combination of RunnableFuture and Comparable (sorting by their next deadline), with additional methods for scheduling, periodicity, and delay.

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
)

Redeclares io.netty5.util.concurrent.RunnableFuture.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
)

Redeclares io.netty5.util.concurrent.RunnableFuture.addListener.

Adds the specified listener to this future.
public long
deadlineNanos()

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

public long
delayNanos()

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

public long
delayNanos(long currentTimeNanos)

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

public boolean

Returns:

true if this task is periodic, otherwise false.
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.

Inherited from java.lang.Comparable:
compareTo

Method Detail

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

Redeclares io.netty5.util.concurrent.RunnableFuture.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)

Redeclares io.netty5.util.concurrent.RunnableFuture.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
deadlineNanosback to summary
public long deadlineNanos()

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

delayNanosback to summary
public long delayNanos()

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

delayNanosback to summary
public long delayNanos(long currentTimeNanos)

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

isPeriodicback to summary
public boolean 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.