JACK 5.4 Application Interface

aos.util
Class ThreadPool

java.lang.Object
  extended byaos.util.ThreadPool
All Implemented Interfaces:
java.lang.Runnable

public class ThreadPool
extends java.lang.Object
implements java.lang.Runnable

A ThreadPool is an object that manages a set threads that are used to process a queue of Runnables.


Constructor Summary
ThreadPool()
          Constructrs a ThreadPool object with 1 for the low and high watermark.
ThreadPool(int hi)
          Constructs a ThreadPool object with the same low and high watermark.
ThreadPool(int lo, int hi)
          Constructs a ThreadPool object with a low and high watermark.
 
Method Summary
 void run()
          This method removes and runs the first Runnable object in the queue, if there are enough to run.
 void run(java.lang.Runnable r)
          This method adds a Runnable object to the queue of Runnables which is being served by the threadpool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPool

public ThreadPool(int lo,
                  int hi)
Constructs a ThreadPool object with a low and high watermark.


ThreadPool

public ThreadPool(int hi)
Constructs a ThreadPool object with the same low and high watermark.


ThreadPool

public ThreadPool()
Constructrs a ThreadPool object with 1 for the low and high watermark.

Method Detail

run

public void run(java.lang.Runnable r)
This method adds a Runnable object to the queue of Runnables which is being served by the threadpool.


run

public void run()
This method removes and runs the first Runnable object in the queue, if there are enough to run.

Specified by:
run in interface java.lang.Runnable

JACK 5.4 Application Interface

Copyright (C) 1999-2008, Agent Oriented Software Pty. Ltd.

US Government Restricted Rights
The JACK Modules and relevant Software Material have been developed entirely at private expense and are accordingly provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013 or subparagraph (c)(1) and (2) of the Commercial Computer Software Restricted Rights and 48 CFR 52.2270-19, as applicable.


Agent Oriented Software Pty. Ltd.     http://www.aosgrp.com
PO Box 639, Carlton South, Victoria 3053, Australia
Phone: +61 3 9349 5055, Fax: +61 3 9349 5088