关闭

ScheduledThreadPoolExecutor.setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value)

标签: delayactionprocessingcommandlist
579人阅读 评论(0) 收藏 举报
分类:
Method Summary
 void execute(Runnable command)
          Execute command with zero required delay.
 boolean getContinueExistingPeriodicTasksAfterShutdownPolicy()
          Get the policy on whether to continue executing existing periodic tasks even when this executor has been shutdown.
 boolean getExecuteExistingDelayedTasksAfterShutdownPolicy()
          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.
 boolean remove(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.
 void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value)
          Set policy on whether to continue executing existing periodic tasks even when this executor has been shutdown.
 void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value)
          Set policy on whether to execute existing delayed tasks even when this executor has been shutdown.
 void shutdown()
          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

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:2343636次
    • 积分:31378
    • 等级:
    • 排名:第156名
    • 原创:962篇
    • 转载:826篇
    • 译文:6篇
    • 评论:39条
    文章分类
    最新评论
    我的栏目
    我的栏目测试