net.sourceforge.wopa
类 FixedThreadPool

java.lang.Object
  继承者 net.sourceforge.wopa.FixedThreadPool

public class FixedThreadPool
extends java.lang.Object

包装了JDK自带的连接池

作者:
Li Rui

字段摘要
private  java.util.concurrent.ExecutorService executor
           
private  boolean stopped
           
 
构造函数摘要
FixedThreadPool(int thread_count)
          创建一个给定数目的线程池
 
方法摘要
 void execute(Saver saver)
          在线程池中增加一个保存器
 boolean isShutdown()
          线程池是否已经终止运行
 void shutdown()
          终止运行当前线程池中的所有线程
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

executor

private java.util.concurrent.ExecutorService executor

stopped

private boolean stopped
构造函数详细信息

FixedThreadPool

public FixedThreadPool(int thread_count)
创建一个给定数目的线程池

参数:
thread_count -
方法详细信息

execute

public void execute(Saver saver)
在线程池中增加一个保存器

参数:
saver -

isShutdown

public boolean isShutdown()
线程池是否已经终止运行

返回:

shutdown

public void shutdown()
终止运行当前线程池中的所有线程