mk.fsgrep.util.thread
Class ThreadPool
java.lang.Object
mk.fsgrep.util.thread.ThreadPool
- All Implemented Interfaces:
- RunCallback
public class ThreadPool
- extends java.lang.Object
- implements RunCallback
- Author:
- Murali Krishnan
Constructor Summary |
ThreadPool(java.lang.String pName,
int pSize)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ThreadPool
public ThreadPool(java.lang.String pName,
int pSize)
initialize
public void initialize()
getAvailable
protected java.util.LinkedList<ThreadRunner> getAvailable()
getName
public java.lang.String getName()
getSize
public int getSize()
removeFirst
protected ThreadRunner removeFirst()
getNextAvailable
protected ThreadRunner getNextAvailable()
findNumberAvailable
protected int findNumberAvailable()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
run
public void run(java.lang.Runnable runnable)
waitForCompletion
public void waitForCompletion()
runFinished
public void runFinished(ThreadRunner runner)
- Specified by:
runFinished
in interface RunCallback
Copyright © 2009. All Rights Reserved.