public abstract class AbstractScheduledEventExecutor extends AbstractEventExecutor
EventExecutor
s 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) |
protected void |
validateScheduled(long amount,
TimeUnit unit)
Deprecated.
will be removed in the future.
|
inEventLoop, iterator, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, newTaskFor, newTaskFor, next, parent, safeExecute, shutdown, shutdownGracefully, shutdownNow, submit, submit, submit
invokeAll, invokeAll, invokeAny, invokeAny
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
inEventLoop
isShuttingDown, shutdownGracefully, terminationFuture
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
forEach, spliterator
protected 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 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 EventExecutorGroup
schedule
in interface ScheduledExecutorService
schedule
in class AbstractEventExecutor
public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
schedule
in interface EventExecutorGroup
schedule
in interface ScheduledExecutorService
schedule
in class AbstractEventExecutor
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate
in interface EventExecutorGroup
scheduleAtFixedRate
in interface ScheduledExecutorService
scheduleAtFixedRate
in class AbstractEventExecutor
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
scheduleWithFixedDelay
in interface EventExecutorGroup
scheduleWithFixedDelay
in interface ScheduledExecutorService
scheduleWithFixedDelay
in class AbstractEventExecutor
@Deprecated protected void validateScheduled(long amount, TimeUnit unit)
Copyright © 2008–2019 The Netty Project. All rights reserved.