net.spy.concurrent
Class ThreadPoolObserver
java.lang.Object
net.spy.SpyObject
net.spy.concurrent.ThreadPoolObserver
public class ThreadPoolObserver
- extends SpyObject
Receive notification of job completion.
|
Method Summary |
protected void |
jobComplete(Runnable r)
This method will be called to indicate the completion of a job. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreadPoolObserver
public ThreadPoolObserver()
- Get an instance of ThreadPoolObserver.
jobComplete
protected void jobComplete(Runnable r)
- This method will be called to indicate the completion of a job.
After jobComplete(Runnable) is called, a notifyAll will be sent
letting anyone watching this thing know that something has occurred.
jobComplete should be quick as to not get in the way of threads
recycling. It will be called inside the ThreadPool's worker thread,
but it is a synchronized call, so if it doesn't return quickly, it
will prevent multiple threads from recycling.
- Parameters:
r - the job that finished
Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.