| Constructor and Description |
|---|
NewThreadScheduler()
Constructor.
|
NewThreadScheduler(java.lang.String name)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.Closeable |
schedule(java.lang.Runnable run)
Schedule for ASAP execution.
|
java.io.Closeable |
schedule(java.lang.Runnable run,
long initialDelay,
long betweenDelay,
java.util.concurrent.TimeUnit unit)
Schedule a repeated execution of the given task with
the given initialDelay (in nanoseconds) and betweenDelay
(in nanoseconds).
|
java.io.Closeable |
schedule(java.lang.Runnable run,
long delay,
java.util.concurrent.TimeUnit unit)
Schedule a single execution of the runnable task
with the given delay of nanoseconds.
|
public NewThreadScheduler()
NewThreadScheduler-#public NewThreadScheduler(@Nonnull
java.lang.String name)
name - the name prefix used when creating new threads.@Nonnull
public java.io.Closeable schedule(@Nonnull
java.lang.Runnable run)
Scheduler@Nonnull
public java.io.Closeable schedule(@Nonnull
java.lang.Runnable run,
long delay,
@Nonnull
java.util.concurrent.TimeUnit unit)
Scheduler@Nonnull
public java.io.Closeable schedule(@Nonnull
java.lang.Runnable run,
long initialDelay,
long betweenDelay,
@Nonnull
java.util.concurrent.TimeUnit unit)
SchedulerExecutorService.scheduleAtFixedRate()).
Note: Implementations might not have the capability to
schedule nanosecond resolution.