17 |
|
* this class extends) are required. |
18 |
|
* |
19 |
|
* <p> Delayed tasks execute no sooner than they are enabled, but |
20 |
< |
* without any real-time guarantees about when, after they are enabled, |
21 |
< |
* they will commence. Tasks tied for the same execution time are |
22 |
< |
* enabled in first-in-first-out (FIFO) order of submission. |
20 |
> |
* without any real-time guarantees about when, after they are |
21 |
> |
* enabled, they will commence. Tasks scheduled for exactly the same |
22 |
> |
* execution time are enabled in first-in-first-out (FIFO) order of |
23 |
> |
* submission. |
24 |
|
* |
25 |
|
* <p>While this class inherits from {@link ThreadPoolExecutor}, a few |
26 |
|
* of the inherited tuning methods are not useful for it. In |
55 |
|
private static final long NANO_ORIGIN = System.nanoTime(); |
56 |
|
|
57 |
|
/** |
58 |
< |
* Return nanosecond time offset by origin |
58 |
> |
* Returns nanosecond time offset by origin |
59 |
|
*/ |
60 |
|
final long now() { |
61 |
|
return System.nanoTime() - NANO_ORIGIN; |
127 |
|
} |
128 |
|
|
129 |
|
/** |
130 |
< |
* Return true if this is a periodic (not a one-shot) action. |
130 |
> |
* Returns true if this is a periodic (not a one-shot) action. |
131 |
|
* @return true if periodic |
132 |
|
*/ |
133 |
|
boolean isPeriodic() { |
454 |
|
* awaiting execution. |
455 |
|
* |
456 |
|
* <p>There are no guarantees beyond best-effort attempts to stop |
457 |
< |
* processing actively executing tasks. This implementations |
458 |
< |
* cancels via {@link Thread#interrupt}, so if any tasks mask or |
457 |
> |
* processing actively executing tasks. This implementation |
458 |
> |
* cancels tasks via {@link Thread#interrupt}, so if any tasks mask or |
459 |
|
* fail to respond to interrupts, they may never terminate. |
460 |
|
* |
461 |
|
* @return list of tasks that never commenced execution. Each |
462 |
|
* element of this list is a {@link ScheduledFuture}, |
463 |
< |
* including those tasks submitted using <tt>execute</tt> which |
463 |
> |
* including those tasks submitted using <tt>execute</tt>, which |
464 |
|
* are for scheduling purposes used as the basis of a zero-delay |
465 |
|
* <tt>ScheduledFuture</tt>. |
466 |
|
*/ |