Class Netty4IOContext.NettyIOScheduler
java.lang.Object
org.apache.qpid.protonj2.client.transport.netty4.Netty4IOContext.NettyIOScheduler
- Enclosing class:
Netty4IOContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
Future
<?> Schedule the givenRunnable
for execution after the given delay.<V> Future
<V> Schedule the given task for execution after the given delay.Future
<?> scheduleAtFixedRate
(Runnable command, long initialDelay, long period, TimeUnit unit) Schedule the given task for execution after the given delay to repeat with the given period.Future
<?> scheduleWithFixedDelay
(Runnable command, long initialDelay, long delay, TimeUnit unit) Schedule the given task for execution after the given delay to repeat with the given period.
-
Constructor Details
-
NettyIOScheduler
public NettyIOScheduler()
-
-
Method Details
-
execute
Description copied from interface:Scheduler
-
schedule
Description copied from interface:Scheduler
Schedule the givenRunnable
for execution after the given delay. -
schedule
Description copied from interface:Scheduler
Schedule the given task for execution after the given delay.- Specified by:
schedule
in interfaceScheduler
- Type Parameters:
V
- The return type of the task- Parameters:
task
- The callable action action to scheduledelay
- The time value to wait before running the command.unit
- The time unit that define the units of the delay value.- Returns:
- a
Future
instance that can be awaited for completion of the task.
-
scheduleAtFixedRate
public Future<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) Description copied from interface:Scheduler
Schedule the given task for execution after the given delay to repeat with the given period.- Specified by:
scheduleAtFixedRate
in interfaceScheduler
- Parameters:
command
- The runnable command to execute at the specified rate.initialDelay
- The initial delay before running the given command.period
- The time period in which to execute the given commandunit
- The units of the specified time period- Returns:
- a
Future
instance that can be awaited for completion of the task.
-
scheduleWithFixedDelay
public Future<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) Description copied from interface:Scheduler
Schedule the given task for execution after the given delay to repeat with the given period.- Specified by:
scheduleWithFixedDelay
in interfaceScheduler
- Parameters:
command
- The runnable command to execute at the specified rate.initialDelay
- The initial delay before running the given command.delay
- The delay time between runs of the given command.unit
- The units of the specified time period- Returns:
- a
Future
instance that can be awaited for completion of the task.
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdown
in interfaceScheduler
- Returns:
- if the
Scheduler
has been shutdown or not.
-