站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 jaxrpc API Documentation 英文版文档

ThreadPool (JAXRPC API) - JBoss 3.2.7 jaxrpc API Documentation 英文版文档


org.apache.axis.components.threadpool
Class ThreadPool

java.lang.Object
  extended byorg.apache.axis.components.threadpool.ThreadPool

public class ThreadPool
extends Object

Author:
James M Snell (jasnell@us.ibm.com)

Field Summary
 boolean _shutdown
           
static long MAX_THREADS
           
protected  long threadcount
           
protected  Map threads
           
 
Constructor Summary
ThreadPool()
           
 
Method Summary
 void addWorker(Runnable worker)
          Adds a new worker to the pool
 void awaitShutdown()
          Await shutdown of the worker
 boolean awaitShutdown(long timeout)
          Await shutdown of the worker
 void cleanup()
           
 long getWorkerCount()
          Returns the total number of currently active workers
 void interruptAll()
          Forcefully interrupt all workers
 boolean isShutdown()
          Returns true if all workers have been shutdown
 boolean isShuttingDown()
          Returns true if all workers are in the process of shutting down
 void safeShutdown()
          Forcefully shutdown the pool
 void shutdown()
          Forcefully shutdown the pool
 void workerDone(Runnable worker, boolean restart)
          Used by MessageWorkers to notify the pool that it is done
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_THREADS

public static final long MAX_THREADS
See Also:
Constant Field Values

threads

protected Map threads

threadcount

protected long threadcount

_shutdown

public boolean _shutdown
Constructor Detail

ThreadPool

public ThreadPool()
Method Detail

cleanup

public void cleanup()
             throws InterruptedException
Throws:
InterruptedException

isShutdown

public boolean isShutdown()
Returns true if all workers have been shutdown


isShuttingDown

public boolean isShuttingDown()
Returns true if all workers are in the process of shutting down


getWorkerCount

public long getWorkerCount()
Returns the total number of currently active workers


addWorker

public void addWorker(Runnable worker)
Adds a new worker to the pool


interruptAll

public void interruptAll()
Forcefully interrupt all workers


shutdown

public void shutdown()
Forcefully shutdown the pool


safeShutdown

public void safeShutdown()
Forcefully shutdown the pool


awaitShutdown

public void awaitShutdown()
                   throws InterruptedException
Await shutdown of the worker

Throws:
InterruptedException

awaitShutdown

public boolean awaitShutdown(long timeout)
                      throws InterruptedException
Await shutdown of the worker

Throws:
InterruptedException

workerDone

public void workerDone(Runnable worker,
                       boolean restart)
Used by MessageWorkers to notify the pool that it is done



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.