A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© pumpkin 中级黑马   /  2015-12-8 11:12  /  673 人查看  /  0 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

Java 并发相关的类
Executors:
factories of various implementation of Executor
Executor:
super interface, represent a consumer that receive task of Runnable,override run() to redefine how it manage Thread
ExecutorService:
subInterface of Executor , provide method to manage the running of Executor, such as isShutdown(), shutdown() ,it also provides Future<V> to monito the state of tasks.

CompletionService :
interface with logic that submit jobs to its insign Executor and then collect the result by putting Future<V> into BlockingQueue

ExecutorCompletionService:
implementation of CompletionService, all the jobs are done by its composite  Executor and it only take charge of its Completion Service logic

Future:
represent the result of an asysnchronous computation

RunnableFuture:
interface the extends Runnable and Future , it can be regarded as a task with feedback
FutureTask:
implementation of RunnableFuture

0 个回复

您需要登录后才可以回帖 登录 | 加入黑马