org.huihoo.jfox.pool.thread
Class SimpleThreadPool
java.lang.Object
org.huihoo.jfox.system.ComponentSupport
org.huihoo.jfox.pool.thread.SimpleThreadPool
- All Implemented Interfaces:
- Component, Loggable, Persistentable, java.io.Serializable, ThreadPool
- public class SimpleThreadPool
- extends ComponentSupport
- implements ThreadPool
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleThreadPool
public SimpleThreadPool()
execute
public void execute(Threadable task)
- Description copied from interface:
ThreadPool
- run a Threadable object
- Specified by:
execute in interface ThreadPool
- Parameters:
task -
doInit
protected void doInit()
throws java.lang.Exception
- Description copied from class:
ComponentSupport
- do actually create action
- Specified by:
doInit in class ComponentSupport
- Throws:
java.lang.Exception
doDestroy
protected void doDestroy()
throws java.lang.Exception
- Description copied from class:
ComponentSupport
- do actually destory action
- Specified by:
doDestroy in class ComponentSupport
- Throws:
java.lang.Exception
clear
public void clear()
getObjectFactory
public ObjectFactory getObjectFactory()
getObjectClass
public java.lang.String getObjectClass()
getWorking
public int getWorking()
getRest
public int getRest()
retrieveObject
public PoolableObject retrieveObject()
throws java.lang.Exception
- Throws:
java.lang.Exception
restoreObject
public boolean restoreObject(PoolableObject obj)
removeObject
public boolean removeObject(PoolableObject obj)