Submits 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.
<p>The sequence of task executions continues indefinitely until
one of the following exceptional completions occur:
<ul>
<li>The task is {@linkplain Future#cancel explicitly cancelled}
via the returned future.
<li>Method {@link #shutdown} is called and the {@linkplain
#getContinueExistingPeriodicTasksAfterShutdownPolicy policy on
whether to continue after shutdown} is not set true, or method
{@link #shutdownNow} is called; also resulting in task
cancellation.
<li>An execution of the task throws an exception. In this case
calling {@link Future#get() get} on the returned future will throw
{@link ExecutionException}, holding the exception as its cause.
</ul>
Subsequent executions are suppressed. Subsequent calls to
{@link Future#isDone isDone()} on the returned future will
return {@code true}.
Submits 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.
<p>The sequence of task executions continues indefinitely until one of the following exceptional completions occur: <ul> <li>The task is {@linkplain Future#cancel explicitly cancelled} via the returned future. <li>Method {@link #shutdown} is called and the {@linkplain #getContinueExistingPeriodicTasksAfterShutdownPolicy policy on whether to continue after shutdown} is not set true, or method {@link #shutdownNow} is called; also resulting in task cancellation. <li>An execution of the task throws an exception. In this case calling {@link Future#get() get} on the returned future will throw {@link ExecutionException}, holding the exception as its cause. </ul> Subsequent executions are suppressed. Subsequent calls to {@link Future#isDone isDone()} on the returned future will return {@code true}.
@throws RejectedExecutionException {@inheritDoc} @throws NullPointerException {@inheritDoc} @throws IllegalArgumentException {@inheritDoc}