ScheduledThreadPoolExecutor.setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value)

原创 2012年03月22日 20:13:03
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

j2ee的spring应用中注入boolean类型的数据会报异常

问题原型:数据库中是否为管理员字段是布尔类型 否 是 提交时报错org.springframework.validation.BindException:...
  • zml1991105
  • zml1991105
  • 2016年08月04日 19:02
  • 1500

你可能不清楚的Java细节(1)--为什么Boolean的hashCode()方法返回值是1231或1237

为什么Boolean的hashCode()方法返回值是1231或1237? hashCode散列算法中为什么常用31作为乘数?...
  • qq_21251983
  • qq_21251983
  • 2016年08月09日 17:11
  • 1217

React/JSX 编码规范

Airbnb React/JSX 编码规范算是最合理的React/JSX编码规范之一了内容目录 基本规范 Class vs React.createClass vs stateless 命名 声明模块...
  • gx15366039985
  • gx15366039985
  • 2016年12月20日 14:44
  • 3026

Java任务调度线程池ScheduledThreadPoolExecutor原理解析

ScheduledThreadPoolExecutor是JDK在ThreadPoolExecutor的基础上实现的任务调度线程池。   ScheduledThreadPoolExecutor的构造函...
  • u011983531
  • u011983531
  • 2018年01月16日 10:06
  • 11

Java线程池架构2-多线程调度器(ScheduledThreadPoolExecutor)

在前面介绍了java的多线程的基本原理信息:《Java线程池架构原理和源码解析(ThreadPoolExecutor)》,本文对这个java本身的线程池的调度器做一个简单扩展,如果还没读过上一篇文章,...
  • panweiwei1994
  • panweiwei1994
  • 2018年01月07日 20:10
  • 49

Java 并发 使用 ScheduledThreadPoolExecutor进行温室参数变化仿真

package com.xyw.concurrent.blog; import java.util.concurrent.*; import java.util.*; /* * 通过模拟温室之中...
  • happylaoxu
  • happylaoxu
  • 2016年02月26日 21:37
  • 790

java中使用ScheduledThreadPoolExecutor实现定时任务

import java.text.SimpleDateFormat; import java.util.Date; import java.util.concurrent.ScheduledFutur...
  • miaomiao47
  • miaomiao47
  • 2013年09月02日 17:19
  • 4898

Java定时任务Timer、TimerTask与ScheduledThreadPoolExecutor详解

定时任务Timer、TimerTask与ScheduledThreadPoolExecutor
  • baidu_37735992
  • baidu_37735992
  • 2017年03月14日 00:37
  • 121

Java 一个优于Timer的定时器——ScheduledThreadPoolExecutor

TimeUnit 时间单元        换算进制: 1 2 3 4 5 6 7 static final long C0 = 1L; // 1微毫秒 static fin...
  • java_magicsun
  • java_magicsun
  • 2013年11月05日 09:51
  • 397

【Java并发】- ScheduledThreadPoolExecutor, ScheduledExecutorService使用

概述     ScheduledExecutorService的接口集成关系: Executor |---ExecutorService |--ScheduledExecutorService...
  • LightOfMiracle
  • LightOfMiracle
  • 2017年07月03日 10:06
  • 158
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:ScheduledThreadPoolExecutor.setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value)
举报原因:
原因补充:

(最多只允许输入30个字)