net.ontopia.topicmaps.impl.utils
Class StorePoolableObjectFactory

java.lang.Object
  extended by net.ontopia.topicmaps.impl.utils.StorePoolableObjectFactory
All Implemented Interfaces:
org.apache.commons.pool.PoolableObjectFactory

public class StorePoolableObjectFactory
extends java.lang.Object
implements org.apache.commons.pool.PoolableObjectFactory

INTERNAL: A commons-pool PoolableObjectFactory that uses a TopicMapStoreFactoryIF to create TopicMapStoreIF objects. This class must be used with a commons-pool pool instance.

Since:
2.1

Field Summary
protected  TopicMapStoreFactoryIF sfactory
           
 java.util.Collection<TopicMapStoreIF> stores
           
 
Constructor Summary
StorePoolableObjectFactory(TopicMapStoreFactoryIF sfactory)
           
 
Method Summary
 void activateObject(java.lang.Object o)
           
 void destroyObject(java.lang.Object o)
           
 java.lang.Object makeObject()
           
 void passivateObject(java.lang.Object o)
           
 boolean validateObject(java.lang.Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sfactory

protected TopicMapStoreFactoryIF sfactory

stores

public java.util.Collection<TopicMapStoreIF> stores
Constructor Detail

StorePoolableObjectFactory

public StorePoolableObjectFactory(TopicMapStoreFactoryIF sfactory)
Method Detail

makeObject

public java.lang.Object makeObject()
                            throws java.lang.Exception
Specified by:
makeObject in interface org.apache.commons.pool.PoolableObjectFactory
Throws:
java.lang.Exception

destroyObject

public void destroyObject(java.lang.Object o)
                   throws java.lang.Exception
Specified by:
destroyObject in interface org.apache.commons.pool.PoolableObjectFactory
Throws:
java.lang.Exception

validateObject

public boolean validateObject(java.lang.Object o)
Specified by:
validateObject in interface org.apache.commons.pool.PoolableObjectFactory

activateObject

public void activateObject(java.lang.Object o)
                    throws java.lang.Exception
Specified by:
activateObject in interface org.apache.commons.pool.PoolableObjectFactory
Throws:
java.lang.Exception

passivateObject

public void passivateObject(java.lang.Object o)
                     throws java.lang.Exception
Specified by:
passivateObject in interface org.apache.commons.pool.PoolableObjectFactory
Throws:
java.lang.Exception


Copyright © 2000-2012 Ontopia.