| Modifier and Type | Field and Description |
|---|---|
| private final Callable | |
| private long | |
| private final AbstractScheduledEventExecutor | |
| private final Future | |
| private final long | |
| private static final AtomicLong | |
| private final long | |
| private final Promise | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv | RunnableScheduledFutureAdapter(AbstractScheduledEventExecutor executor, Promise<V> promise, Callable<V> callable, long deadlineNanos, long periodNanos)
|
| Modifier and Type | Method and Description |
|---|---|
| public RunnableScheduledFuture | 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. |
| public <C> RunnableScheduledFuture | 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. |
| public FutureCompletionStage | asStage()
Implements io. FutureCompletionStage that reflects the state of this Future and so will receive all
updates as well.
|
| public boolean | cancel()
Implements io. |
| public Throwable | cause()
Implements io. |
| public int | compareTo(RunnableScheduledFuture<?>
the object to be compared. o)Implements java. |
| public long | deadlineNanos()
Implements io. run() method should be called again.
|
| private static long | |
| public long | delayNanos()
Implements io. run() method should be called again.
|
| public long | delayNanos(long currentTimeNanos)
Implements io. currentTimeNanos into account) when the
run() method should be called again.
|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public EventExecutor | executor()
Implements io. EventExecutor that is tied to this Promise or Future.
|
| public V | getNow()
Implements io. |
| public int | |
| public boolean | isCancellable()
Implements io. true if and only if the operation can be cancelled via cancel().
|
| public boolean | isCancelled()
Implements io. true if this operation has been cancelled.
|
| public boolean | isDone()
Implements io. true if this operation has been completed either successfully, unsuccessfully, or through
cancellation.
|
| public boolean | isFailed()
Implements io. true if and only if the operation was completed and failed.
|
| public boolean | isPeriodic()
Implements io. 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. true if and only if the operation was completed successfully.
|
| public int | priorityQueueIndex(DefaultPriorityQueue<?> queue)
Implements io. priorityQueueIndex(DefaultPriorityQueue, int) for the value corresponding to
queue.
|
| public void | priorityQueueIndex(DefaultPriorityQueue<?>
The queue for which the index is being set. queue, int The index as used by i)DefaultPriorityQueue.Implements io. DefaultPriorityQueue to maintain state for an element in the queue.
|
| public void | |
| public String |
| callable | back to summary |
|---|---|
| private final Callable<V> callable | |
| deadlineNanos | back to summary |
|---|---|
| private long deadlineNanos | |
| executor | back to summary |
|---|---|
| private final AbstractScheduledEventExecutor executor | |
| future | back to summary |
|---|---|
| private final Future<V> future | |
| id | back to summary |
|---|---|
| private final long id | |
| NEXT_TASK_ID | back to summary |
|---|---|
| private static final AtomicLong NEXT_TASK_ID | |
| periodNanos | back to summary |
|---|---|
| private final long periodNanos | |
| promise | back to summary |
|---|---|
| private final Promise<V> promise | |
| queueIndex | back to summary |
|---|---|
| private int queueIndex | |
| RunnableScheduledFutureAdapter | back to summary |
|---|---|
| pack-priv RunnableScheduledFutureAdapter(AbstractScheduledEventExecutor executor, Promise<V> promise, Callable<V> callable, long deadlineNanos, long periodNanos) | |
| addListener | back to summary |
|---|---|
| public RunnableScheduledFuture Implements io. Doc from io. 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.
| |
| addListener | back to summary |
|---|---|
| public <C> RunnableScheduledFuture Implements io. Doc from io. 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.
| |
| asStage | back to summary |
|---|---|
| public FutureCompletionStage Implements io. Doc from io. Returns a
The returned
| |
| cancel | back to summary |
|---|---|
| public boolean cancel() Implements io. Doc from io. 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
Cancellation will not cause any threads working on the operation to be interrupted.
| |
| cause | back to summary |
|---|---|
| public Throwable cause() Implements io. Doc from io. Returns the cause of the failed operation if the operation has failed. | |
| compareTo | back to summary |
|---|---|
| public int compareTo(RunnableScheduledFuture<?> o) Implements java. Doc from java. 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 The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| deadlineNanos | back to summary |
|---|---|
| public long deadlineNanos() Implements io. Doc from io. Returns the deadline in nanos when the
| |
| deadlineToDelayNanos | back to summary |
|---|---|
| private static long deadlineToDelayNanos(long currentTimeNanos, long deadlineNanos) | |
| delayNanos | back to summary |
|---|---|
| public long delayNanos() Implements io. Doc from io. Returns the delay in nanos when the
| |
| delayNanos | back to summary |
|---|---|
| public long delayNanos(long currentTimeNanos) Implements io. Doc from io. Returns the delay in nanos (taking the given
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| executor | back to summary |
|---|---|
| public EventExecutor executor() Implements io. Doc from io. Returns the
| |
| getNow | back to summary |
|---|---|
| public V getNow() Implements io. Doc from io. Return the successful result of this asynchronous operation, if any.
If the operation has not yet been completed, then this will throw
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isCancellable | back to summary |
|---|---|
| public boolean isCancellable() Implements io. Doc from io. Returns
| |
| isCancelled | back to summary |
|---|---|
| public boolean isCancelled() Implements io. Doc from io. Return
| |
| isDone | back to summary |
|---|---|
| public boolean isDone() Implements io. Doc from io. Return
| |
| isFailed | back to summary |
|---|---|
| public boolean isFailed() Implements io. Doc from io. Returns
| |
| isPeriodic | back to summary |
|---|---|
| public boolean isPeriodic() Implements io. Doc from io. Return
| |
| isSuccess | back to summary |
|---|---|
| public boolean isSuccess() Implements io. Doc from io. Returns
| |
| priorityQueueIndex | back to summary |
|---|---|
| public int priorityQueueIndex(DefaultPriorityQueue<?> queue) Implements io. Doc from io. Get the last value set by Throwing exceptions from this method will result in undefined behavior.
| |
| priorityQueueIndex | back to summary |
|---|---|
| public void priorityQueueIndex(DefaultPriorityQueue<?> queue, int i) Implements io. Doc from io. Used by Throwing exceptions from this method will result in undefined behavior.
| |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |