public abstract class AbstractScheduledEventExecutor extends AbstractEventExecutor
EventExecutors that want to support scheduling.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractScheduledEventExecutor() |
protected |
AbstractScheduledEventExecutor(EventExecutorGroup parent) |
| Modifier and Type | Method and Description |
|---|---|
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 Runnable |
pollScheduledTask() |
protected Runnable |
pollScheduledTask(long nanoTime)
Return the
Runnable which is ready to be executed with the given nanoTime. |
<V> ScheduledFuture<V> |
schedule(Callable<V> callable,
long delay,
TimeUnit unit) |
ScheduledFuture<?> |
schedule(Runnable command,
long delay,
TimeUnit unit) |
ScheduledFuture<?> |
scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit) |
ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit) |
children, close, inEventLoop, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, newTaskFor, newTaskFor, next, parent, shutdown, shutdownGracefully, shutdownNow, submit, submit, submit, unwrapinvokeAll, invokeAll, invokeAny, invokeAnyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinEventLoopisShuttingDown, shutdownGracefully, terminationFutureawaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminatedprotected AbstractScheduledEventExecutor()
protected AbstractScheduledEventExecutor(EventExecutorGroup parent)
protected static long nanoTime()
protected void cancelScheduledTasks()
AbstractEventExecutor.inEventLoop() is true.protected final Runnable pollScheduledTask()
#pollScheduledTask(long)}protected final 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(Runnable command, long delay, TimeUnit unit)
schedule in interface EventExecutorGroupschedule in interface ScheduledExecutorServiceschedule in class AbstractEventExecutorpublic <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
schedule in interface EventExecutorGroupschedule in interface ScheduledExecutorServiceschedule in class AbstractEventExecutorpublic ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate in interface EventExecutorGroupscheduleAtFixedRate in interface ScheduledExecutorServicescheduleAtFixedRate in class AbstractEventExecutorpublic ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
scheduleWithFixedDelay in interface EventExecutorGroupscheduleWithFixedDelay in interface ScheduledExecutorServicescheduleWithFixedDelay in class AbstractEventExecutorCopyright © 2008–2015 The Netty Project. All rights reserved.