org.activemath.omdocjdom
Interface SimplePool.Poolable

All Known Implementing Classes:
ID.PoolableRE, SimplePoolPassive.Wrapper
Enclosing class:
SimplePool

public static interface SimplePool.Poolable


Method Summary
 void destroy(long timeout)
           
 void init()
           
 boolean isBusy()
          Returns wether a thread is currently making it busy.
 void run()
          Must return only when the task is finished.
 

Method Detail

init

void init()

destroy

void destroy(long timeout)

run

void run()
Must return only when the task is finished. Should not be called by external apps but by the pool. When finished, the thread calling should be Object.notify()ed


isBusy

boolean isBusy()
Returns wether a thread is currently making it busy. This method should be synchronized in implementations as responding false to this method may make its run() method to be called. This method will be called very often, so please ensure that it is just a flag-reading.