Franz Inc, AllegroGraph

com.franz.agraph.pool
Class AGConnFactory

java.lang.Object
  extended by com.franz.util.Closer
      extended by com.franz.agraph.pool.AGConnFactory
All Implemented Interfaces:
Closeable, org.apache.commons.pool.PoolableObjectFactory

public class AGConnFactory
extends Closer
implements org.apache.commons.pool.PoolableObjectFactory

Adapts the AGRepositoryConnection API to the commons-pool factory interface, leaving creation of the connection (and configuration) to a subclass, defined by users of this library.

Since:
v4.3.3

Constructor Summary
AGConnFactory(AGConnConfig props)
           
 
Method Summary
 void activateObject(Object obj)
           
 void destroyObject(Object obj)
           
 Object makeObject()
           
 void passivateObject(Object obj)
           
 boolean validateObject(Object obj)
           
 
Methods inherited from class com.franz.util.Closer
close, Close, Close, Close, Close, Close, close, Close, Close, closeAll, closeLater, remove, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AGConnFactory

public AGConnFactory(AGConnConfig props)
              throws RepositoryException
Throws:
RepositoryException
Method Detail

makeObject

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

activateObject

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

destroyObject

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

passivateObject

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

validateObject

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

Copyright © 2008-2011 Franz Inc.