org.activemath.omdocjdom
Class ID.PoolableRE
java.lang.Object
org.activemath.omdocjdom.ID.PoolableRE
- All Implemented Interfaces:
- SimplePool.Poolable
- Enclosing class:
- ID
protected static class ID.PoolableRE
- extends Object
- implements SimplePool.Poolable
|
Constructor Summary |
protected |
ID.PoolableRE(org.apache.regexp.RE re)
|
|
Method Summary |
void |
destroy(long timeout)
|
void |
doMatch(String string)
|
void |
init()
|
boolean |
isBusy()
Returns wether a thread is currently making it busy. |
boolean |
isFound()
|
void |
run()
Must return only when the task is finished. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
toMatch
protected String toMatch
busy
protected boolean busy
matcher
protected final org.apache.regexp.RE matcher
found
protected boolean found
ID.PoolableRE
protected ID.PoolableRE(org.apache.regexp.RE re)
init
public void init()
- Specified by:
init in interface SimplePool.Poolable
destroy
public void destroy(long timeout)
- Specified by:
destroy in interface SimplePool.Poolable
doMatch
public void doMatch(String string)
isFound
public boolean isFound()
run
public void run()
- Description copied from interface:
SimplePool.Poolable
- 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
- Specified by:
run in interface SimplePool.Poolable
isBusy
public boolean isBusy()
- Description copied from interface:
SimplePool.Poolable
- 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
SimplePool.Poolable.run()
method to be called.
This method will be called very often, so please ensure
that it is just a flag-reading.
- Specified by:
isBusy in interface SimplePool.Poolable