ScheduledThreadPoolExecutor.setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value)

Method Summary
 voidexecute(Runnable command)
          Execute command with zero required delay.
 booleangetContinueExistingPeriodicTasksAfterShutdownPolicy()
          Get the policy on whether to continue executing existing periodic tasks even when this executor has been shutdown.
 booleangetExecuteExistingDelayedTasksAfterShutdownPolicy()
          Get policy on whether to execute existing delayed tasks even when this executor has been shutdown.
 BlockingQueue<Runnable>getQueue()
          Returns the task queue used by this executor.
 booleanremove(Runnable task)
          Removes this task from the executor's internal queue if it is present, thus causing it not to be run if it has not already started.
<V> ScheduledFuture<V>
schedule(Callable<V> callable, long delay, TimeUnit unit)
          Creates and executes a ScheduledFuture that becomes enabled after the given delay.
 ScheduledFuture<?>schedule(Runnable command, long delay, TimeUnit unit)
          Creates and executes a one-shot action that becomes enabled after the given delay.
 ScheduledFuture<?>scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
          Creates and executes a periodic action that becomes enabled first after the given initial delay, and subsequently with the given period; that is executions will commence after initialDelay then initialDelay+period, then initialDelay + 2 * period, and so on.
 ScheduledFuture<?>scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
          Creates and executes a periodic action that becomes enabled first after the given initial delay, and subsequently with the given delay between the termination of one execution and the commencement of the next.
 voidsetContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value)
          Set policy on whether to continue executing existing periodic tasks even when this executor has been shutdown.
 voidsetExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value)
          Set policy on whether to execute existing delayed tasks even when this executor has been shutdown.
 voidshutdown()
          Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted.
 List<Runnable>shutdownNow()
          Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution.
<T> Future<T>
submit(Callable<T> task)
          Submits a value-returning task for execution and returns a Future representing the pending results of the task.
 Future<?>submit(Runnable task)
          Submits a Runnable task for execution and returns a Future representing that task.
<T> Future<T>
submit(Runnable task, T result)
          Submits a Runnable task for execution and returns a Future representing that task that will upon completion return the given result
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值