public abstract class AbstractScheduledEventExecutor extends AbstractEventExecutor
EventExecutors that want to support scheduling.| 构造器和说明 |
|---|
AbstractScheduledEventExecutor() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
cancelScheduledTasks()
Cancel all scheduled tasks.
|
protected boolean |
hasScheduledTasks()
Returns
true if a scheduled task is ready for processing. |
protected static long |
nanoTime() |
protected long |
nextScheduledTaskNano()
Return the nanoseconds when the next scheduled task is ready to be run or
-1 if no task is scheduled. |
protected java.lang.Runnable |
pollScheduledTask() |
protected java.lang.Runnable |
pollScheduledTask(long nanoTime)
Return the
Runnable which is ready to be executed with the given nanoTime. |
<V> ScheduledFuture<V> |
schedule(java.util.concurrent.Callable<V> callable,
long delay,
java.util.concurrent.TimeUnit unit) |
ScheduledFuture<?> |
schedule(java.lang.Runnable command,
long delay,
java.util.concurrent.TimeUnit unit) |
ScheduledFuture<?> |
scheduleAtFixedRate(java.lang.Runnable command,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit) |
ScheduledFuture<?> |
scheduleWithFixedDelay(java.lang.Runnable command,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit unit) |
inEventLoop, iterator, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, newTaskFor, newTaskFor, next, shutdown, shutdownGracefully, shutdownNow, submit, submit, submitclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinEventLoop, parentisShuttingDown, shutdownGracefully, terminationFutureprotected static long nanoTime()
protected void cancelScheduledTasks()
AbstractEventExecutor.inEventLoop() is true.protected final java.lang.Runnable pollScheduledTask()
protected final java.lang.Runnable pollScheduledTask(long nanoTime)
Runnable which is ready to be executed with the given nanoTime.
You should use nanoTime() to retrieve the the correct nanoTime.protected final long nextScheduledTaskNano()
-1 if no task is scheduled.protected final boolean hasScheduledTasks()
true if a scheduled task is ready for processing.public ScheduledFuture<?> schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)
schedule 在接口中 EventExecutorGroupschedule 在接口中 java.util.concurrent.ScheduledExecutorServiceschedule 在类中 AbstractEventExecutorpublic <V> ScheduledFuture<V> schedule(java.util.concurrent.Callable<V> callable, long delay, java.util.concurrent.TimeUnit unit)
schedule 在接口中 EventExecutorGroupschedule 在接口中 java.util.concurrent.ScheduledExecutorServiceschedule 在类中 AbstractEventExecutorpublic ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
scheduleAtFixedRate 在接口中 EventExecutorGroupscheduleAtFixedRate 在接口中 java.util.concurrent.ScheduledExecutorServicescheduleAtFixedRate 在类中 AbstractEventExecutorpublic ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit)
scheduleWithFixedDelay 在接口中 EventExecutorGroupscheduleWithFixedDelay 在接口中 java.util.concurrent.ScheduledExecutorServicescheduleWithFixedDelay 在类中 AbstractEventExecutor