org.sblim.wbem.util

Class ThreadPool


public class ThreadPool
extends java.lang.Object

ThreadPool.java (C) Copyright IBM Corp. 2005, 2006 THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. You can obtain a current copy of the Common Public License from http://www.opensource.org/licenses/cpl1.0.php

Constructor Summary

ThreadPool()
ThreadPool(int minPoolSize, int maxPoolSize)

Method Summary

protected org.sblim.wbem.util.ThreadPool.Worker
createWorker()
boolean
execute(Runnable task)
boolean
execute(Runnable task, boolean enqueue)
ThreadGroup
getGroup()
long
getIdleTimeOutMs()
static ThreadPool
getInstance()
protected Vector
getThreadPool()
protected void
removeThread(org.sblim.wbem.util.ThreadPool.Worker worker)
void
shutdown()
boolean
taskCompleted(org.sblim.wbem.util.ThreadPool.Worker worker, boolean timeout)

Constructor Details

ThreadPool

public ThreadPool()

ThreadPool

public ThreadPool(int minPoolSize,
                  int maxPoolSize)

Method Details

createWorker

protected org.sblim.wbem.util.ThreadPool.Worker createWorker()

execute

public boolean execute(Runnable task)

execute

public boolean execute(Runnable task,
                       boolean enqueue)

getGroup

public ThreadGroup getGroup()

getIdleTimeOutMs

public long getIdleTimeOutMs()

getInstance

public static ThreadPool getInstance()

getThreadPool

protected Vector getThreadPool()

removeThread

protected void removeThread(org.sblim.wbem.util.ThreadPool.Worker worker)

shutdown

public void shutdown()

taskCompleted

public boolean taskCompleted(org.sblim.wbem.util.ThreadPool.Worker worker,
                             boolean timeout)

Copyright © 2005, 2006 IBM Corporation. All Rights Reserved.