码迷,mamicode.com
首页 > 编程语言 > 详细

java多线程---------java.util.concurrent并发包----------ThreadPoolExecutor

时间:2018-08-27 01:04:39      阅读:224      评论:0      收藏:0      [点我收藏+]

标签:reject   并发包   run   并发   executor   pool   rdo   style   线程   

ThreadPoolExecutor线程池

一、三个构造方法

  ThreadPoolExecutor(int corePoolSize,int MaxmumPoolSize,long KeepAliveTime,,TimeUnit  unit,BolokingQueue<Runnable> workQueue)

   ThreadPoolExecutor(int corePoolSize,int MaxmumPoolSize,long KeepAliveTime,,TimeUnit  unit,BolokingQueue<Runnable> workQueue,RejectExceptionHandler handler)

  ThreadPoolExecutor(int corePoolSize,int MaxmumPoolSize,long KeepAliveTime,,TimeUnit  unit,BolokingQueue<Runnable> workQueue,ThreadFactory threadFactory)

  ThreadPoolExecutor(int corePoolSize,int MaxmumPoolSize,long KeepAliveTime,,TimeUnit  unit,BolokingQueue<Runnable> workQueue,ThreadFactory threadFactory,RejecExceptiontHandler handler,)

  标注

  1、CorePoolSize  线程池的基本大小

  2、MaxmunPoolSize  线程池最大数量

  3、KeepAliveTime  线程活动保持时间

  4、BlokingQueue 任务队列  (ArrayBlokingQueue   LinkedBlokingQueue  synchronousQueue  PriorityBlokingQueue)

  5、RejectExceptionHandler  饱和策略    (AbortPlicy  CallerRunsPolicy DiscardOldestPolicy  DiscardPolicy)

  6、ThreadFactory 

  

java多线程---------java.util.concurrent并发包----------ThreadPoolExecutor

标签:reject   并发包   run   并发   executor   pool   rdo   style   线程   

原文地址:https://www.cnblogs.com/hanxue112253/p/9539621.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!