public class FiberTimedScheduler
extends java.lang.Object
| Constructor and Description |
|---|
FiberTimedScheduler(FiberScheduler scheduler) |
FiberTimedScheduler(FiberScheduler scheduler,
FibersMonitor monitor) |
FiberTimedScheduler(FiberScheduler scheduler,
java.util.concurrent.ThreadFactory threadFactory,
FibersMonitor monitor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit) |
void |
finalize() |
int |
getQueueLength() |
boolean |
isShutdown() |
boolean |
isTerminated() |
protected void |
reject(java.lang.Object command) |
java.util.concurrent.Future<java.lang.Void> |
schedule(Fiber<?> fiber,
java.lang.Object blocker,
long delay,
java.util.concurrent.TimeUnit unit) |
void |
shutdown()
Initiates an orderly shutdown in which previously submitted
tasks are executed, but no new tasks will be accepted.
|
void |
shutdownNow()
Attempts to stop all actively executing tasks, halts the
processing of waiting tasks, and returns a list of the tasks
that were awaiting execution.
|
public FiberTimedScheduler(FiberScheduler scheduler, java.util.concurrent.ThreadFactory threadFactory, FibersMonitor monitor)
public FiberTimedScheduler(FiberScheduler scheduler, FibersMonitor monitor)
public FiberTimedScheduler(FiberScheduler scheduler)
public java.util.concurrent.Future<java.lang.Void> schedule(Fiber<?> fiber, java.lang.Object blocker, long delay, java.util.concurrent.TimeUnit unit)
public int getQueueLength()
protected void reject(java.lang.Object command)
public void shutdown()
This method does not wait for previously submitted tasks to
complete execution. Use awaitTermination
to do that.
If the ExecuteExistingDelayedTasksAfterShutdownPolicy
has been set false, existing delayed tasks whose delays
have not yet elapsed are cancelled. And unless the ContinueExistingPeriodicTasksAfterShutdownPolicy has been set
true, future executions of existing periodic tasks will
be cancelled.
public void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void shutdownNow()
This method does not wait for actively executing tasks to
terminate. Use awaitTermination to
do that.
There are no guarantees beyond best-effort attempts to stop
processing actively executing tasks. This implementation
cancels tasks via Thread.interrupt(), so any task that
fails to respond to interrupts may never terminate.
public boolean awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic boolean isShutdown()
public boolean isTerminated()