Class Netty4IOContext.NettyIOScheduler
java.lang.Object
org.apache.qpid.protonj2.client.transport.netty4.Netty4IOContext.NettyIOScheduler
- Enclosing class:
- Netty4IOContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanFuture<?>Schedule the givenRunnablefor 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:SchedulerSchedule the givenRunnablefor execution after the given delay. -
schedule
Description copied from interface:SchedulerSchedule the given task for execution after the given delay.- Specified by:
schedulein 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
Futureinstance 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:SchedulerSchedule the given task for execution after the given delay to repeat with the given period.- Specified by:
scheduleAtFixedRatein 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
Futureinstance 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:SchedulerSchedule the given task for execution after the given delay to repeat with the given period.- Specified by:
scheduleWithFixedDelayin 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
Futureinstance that can be awaited for completion of the task.
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceScheduler- Returns:
- if the
Schedulerhas been shutdown or not.
-