public interface ThreadExecutor extends CallableExecutor, RunnableExecutor
| Modifier and Type | Method and Description |
|---|---|
<T> ScheduledFuture<T> |
schedule(Callable<T> task,
javax.measure.Measurable<javax.measure.quantity.Duration> delay)
Creates and executes a ScheduledFuture that becomes enabled after the
given delay.
|
ScheduledFuture<?> |
schedule(Runnable task,
javax.measure.Measurable<javax.measure.quantity.Duration> delay)
Creates and executes a ScheduledFuture that becomes enabled after the
given delay.
|
ScheduledFuture<?> |
scheduleAtFixedRate(Runnable task,
Date initialTime,
javax.measure.Measurable<javax.measure.quantity.Duration> period)
For the sake of cancellability but not provide a usable result Creates
and executes a periodic action that becomes enabled first at the given
initial time, and subsequently with the given period; that is
executions will commence at initialTime then initialTime+period, then
initialTime + 2 * period, and so on.
|
ScheduledFuture<?> |
scheduleAtFixedRate(Runnable task,
javax.measure.Measurable<javax.measure.quantity.Duration> initialDelay,
javax.measure.Measurable<javax.measure.quantity.Duration> period)
Creates and executes a periodic action that becomes enabled first after
the given initial delay, and subsequently with the given period; that
is executions will commence after initialDelay then
initialDelay+period, then initialDelay + 2 * period, and so on.
|
ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable task,
javax.measure.Measurable<javax.measure.quantity.Duration> initialDelay,
javax.measure.Measurable<javax.measure.quantity.Duration> delay)
Creates and executes a periodic action that becomes enabled first after
the given initial delay, and subsequently with the given delay between
the termination of one execution and the commencement of the next.
|
submitsubmit<T> ScheduledFuture<T> schedule(Callable<T> task, javax.measure.Measurable<javax.measure.quantity.Duration> delay)
T - the type of the execution resulttask - the task to be executeddelay - the time from now to delay executionScheduledFuture<?> schedule(Runnable task, javax.measure.Measurable<javax.measure.quantity.Duration> delay)
task - the runnable task to be executeddelay - the time from now to delay executionScheduledFuture<?> scheduleAtFixedRate(Runnable task, javax.measure.Measurable<javax.measure.quantity.Duration> initialDelay, javax.measure.Measurable<javax.measure.quantity.Duration> period)
task - the task to be executedinitialDelay - the time to delay first executionperiod - the period between successive executionsScheduledFuture<?> scheduleAtFixedRate(Runnable task, Date initialTime, javax.measure.Measurable<javax.measure.quantity.Duration> period) throws IllegalArgumentException
task - the task to be executedinitialTime - the time of the first executionperiod - the period between successive executionsIllegalArgumentException - if initialTime is in the pastScheduledFuture<?> scheduleWithFixedDelay(Runnable task, javax.measure.Measurable<javax.measure.quantity.Duration> initialDelay, javax.measure.Measurable<javax.measure.quantity.Duration> delay)
task - the task to be executedinitialDelay - the time to delay first execution.delay - the delay between the termination of one execution and the
commencement of the nextCopyright © 2014. All Rights Reserved.