接口的使用
cn.wjybxx.concurrent.IScheduledFuture
使用IScheduledFuture的程序包
-
cn.wjybxx.concurrent中IScheduledFuture的使用
修饰符和类型方法说明<V> IScheduledFuture<V> AbstractEventLoopGroup.schedule(ScheduledTaskBuilder<V> builder) <V> IScheduledFuture<V> <V> IScheduledFuture<V> IScheduledExecutorService.schedule(ScheduledTaskBuilder<V> builder) 为避免过多的参数和重载方法,我们通过Builder构建更为复杂的任务。延迟指定时间后执行给定的任务<V> IScheduledFuture<V> 延迟指定时间后执行给定的任务AbstractEventLoopGroup.scheduleAction(Consumer<? super IContext> task, IContext ctx, long delay, TimeUnit unit) IScheduledExecutorService.scheduleAction(Consumer<? super IContext> task, IContext ctx, long delay, TimeUnit unit) 延迟指定时间后执行给定的任务AbstractEventLoopGroup.scheduleAtFixedRate(Runnable task, long initialDelay, long period, TimeUnit unit) IScheduledExecutorService.scheduleAtFixedRate(Runnable task, long initialDelay, long period, TimeUnit unit) 以固定频率执行给定的任务(少执行了会补-慎用)<V> IScheduledFuture<V> AbstractEventLoopGroup.scheduleFunc(Function<? super IContext, V> task, IContext ctx, long delay, TimeUnit unit) <V> IScheduledFuture<V> IScheduledExecutorService.scheduleFunc(Function<? super IContext, V> task, IContext ctx, long delay, TimeUnit unit) 延迟指定时间后执行给定的任务AbstractEventLoopGroup.scheduleWithFixedDelay(Runnable task, long initialDelay, long delay, TimeUnit unit) IScheduledExecutorService.scheduleWithFixedDelay(Runnable task, long initialDelay, long delay, TimeUnit unit) 以固定延迟执行给定的任务(少执行了就少执行了) -
cn.wjybxx.sequential中IScheduledFuture的使用
修饰符和类型方法说明<V> IScheduledFuture<V> AbstractUniScheduledExecutor.schedule(ScheduledTaskBuilder<V> builder) <V> IScheduledFuture<V> AbstractUniScheduledExecutor.scheduleAction(Consumer<? super IContext> task, IContext ctx, long delay, TimeUnit unit) AbstractUniScheduledExecutor.scheduleAtFixedRate(Runnable task, long initialDelay, long period, TimeUnit unit) <V> IScheduledFuture<V> AbstractUniScheduledExecutor.scheduleFunc(Function<? super IContext, V> task, IContext ctx, long delay, TimeUnit unit) AbstractUniScheduledExecutor.scheduleWithFixedDelay(Runnable task, long initialDelay, long delay, TimeUnit unit)