TaskScheduler implementation suitable
for disabling scheduling, typically used for test setups.
Will accept any scheduling request but never actually execute it.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ScheduledFuture | schedule(Runnable
the Runnable to execute whenever the trigger fires task, Trigger an implementation of the trigger)Trigger interface,
e.g. a org. object
wrapping a cron expressionImplements org. Runnable, invoking it whenever the trigger
indicates a next execution time.
|
| public ScheduledFuture | schedule(Runnable
the Runnable to execute whenever the trigger fires task, Instant the desired execution time for the task
(if this is in the past, the task will be executed immediately, i.e. as soon as possible) startTime)Implements org. Runnable, invoking it at the specified execution time.
|
| public ScheduledFuture | scheduleAtFixedRate(Runnable
the Runnable to execute whenever the trigger fires task, Instant the desired first execution time for the task
(if this is in the past, the task will be executed immediately, i.e. as soon as possible) startTime, Duration the interval between successive executions of the task period)Implements org. Runnable, invoking it at the specified execution time
and subsequently with the given period.
|
| public ScheduledFuture | scheduleAtFixedRate(Runnable
the Runnable to execute whenever the trigger fires task, Duration the interval between successive executions of the task period)Implements org. Runnable, starting as soon as possible and
invoking it with the given period.
|
| public ScheduledFuture | scheduleWithFixedDelay(Runnable
the Runnable to execute whenever the trigger fires task, Instant the desired first execution time for the task
(if this is in the past, the task will be executed immediately, i.e. as soon as possible) startTime, Duration the delay between the completion of one execution and the start of the next delay)Implements org. Runnable, invoking it at the specified execution time
and subsequently with the given delay between the completion of one execution
and the start of the next.
|
| public ScheduledFuture | scheduleWithFixedDelay(Runnable
the Runnable to execute whenever the trigger fires task, Duration the delay between the completion of one execution and the start of the next delay)Implements org. Runnable, starting as soon as possible and invoking it with
the given delay between the completion of one execution and the start of the next.
|
| NoOpTaskScheduler | back to summary |
|---|---|
| public NoOpTaskScheduler() | |
| schedule | back to summary |
|---|---|
| public ScheduledFuture Implements org. Doc from org. Schedule the given Execution will end once the scheduler shuts down or the returned
| |
| schedule | back to summary |
|---|---|
| public ScheduledFuture Implements org. Doc from org. Schedule the given Execution will end once the scheduler shuts down or the returned
| |
| scheduleAtFixedRate | back to summary |
|---|---|
| public ScheduledFuture Implements org. Doc from org. Schedule the given Execution will end once the scheduler shuts down or the returned
| |
| scheduleAtFixedRate | back to summary |
|---|---|
| public ScheduledFuture Implements org. Doc from org. Schedule the given Execution will end once the scheduler shuts down or the returned
| |
| scheduleWithFixedDelay | back to summary |
|---|---|
| public ScheduledFuture Implements org. Doc from org. Schedule the given Execution will end once the scheduler shuts down or the returned
| |
| scheduleWithFixedDelay | back to summary |
|---|---|
| public ScheduledFuture Implements org. Doc from org. Schedule the given Execution will end once the scheduler shuts down or the returned
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | cancel(boolean
true if the thread
executing this task should be interrupted (if the thread is
known to the implementation); otherwise, in-progress tasks are
allowed to completeImplements java. |
| public int | compareTo(Delayed
the object to be compared. other)Implements java. |
| public V | get()
Implements java. |
| public V | get(long
the maximum time to wait timeout, TimeUnit the time unit of the timeout argument unit)Implements java. |
| public long | getDelay(TimeUnit
the time unit unit)Implements java. |
| public boolean | isCancelled()
Implements java. true if this task was cancelled before it completed
normally.
|
| public boolean |
| NoOpScheduledFuture | back to summary |
|---|---|
| private NoOpScheduledFuture() | |
| cancel | back to summary |
|---|---|
| public boolean cancel(boolean mayInterruptIfRunning) Implements java. Doc from java. Attempts to cancel execution of this task. This method has no
effect if the task is already completed or cancelled, or could
not be cancelled for some other reason. Otherwise, if this
task has not started when The return value from this method does not necessarily
indicate whether the task is now cancelled; use
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(Delayed other) 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 | |
| get | back to summary |
|---|---|
| public V get() Implements java. Doc from java. Waits if necessary for the computation to complete, and then retrieves its result.
| |
| get | back to summary |
|---|---|
| public V get(long timeout, TimeUnit unit) Implements java. Doc from java. Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available. | |
| getDelay | back to summary |
|---|---|
| public long getDelay(TimeUnit unit) Implements java. Doc from java. Returns the remaining delay associated with this object, in the given time unit. | |
| isCancelled | back to summary |
|---|---|
| public boolean isCancelled() Implements java. Doc from java. Returns
| |
| isDone | back to summary |
|---|---|
| public boolean isDone() Implements java. Doc from java. Returns
| |