Class TransformationConnectorPool
- java.lang.Object
-
- org.apache.manifoldcf.agents.transformationconnectorpool.TransformationConnectorPool
-
- All Implemented Interfaces:
ITransformationConnectorPool
public class TransformationConnectorPool extends java.lang.Object implements ITransformationConnectorPool
An implementation of ITransformationConnectorPool. Coordination and allocation among cluster members is managed within. These objects are thread-local, so do not share them among threads.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classTransformationConnectorPool.LocalPoolActual static output connector pool
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidprotected static TransformationConnectorPool.LocalPoollocalPoolLocal connector poolprotected IThreadContextthreadContextThread context
-
Constructor Summary
Constructors Constructor Description TransformationConnectorPool(IThreadContext threadContext)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseAllConnectors()Clean up all open output connector handles.voidflushUnusedConnectors()Flush only those connector handles that are currently unused.ITransformationConnectorgrab(ITransformationConnection transformationConnection)Get a transformation connector.ITransformationConnector[]grabMultiple(java.lang.String[] orderingKeys, ITransformationConnection[] transformationConnections)Get multiple transformation connectors, all at once.voidpollAllConnectors()Idle notification for inactive transformation connector handles.voidrelease(ITransformationConnection connection, ITransformationConnector connector)Release a transformation connector.voidreleaseMultiple(ITransformationConnection[] connections, ITransformationConnector[] connectors)Release multiple transformation connectors.
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
localPool
protected static final TransformationConnectorPool.LocalPool localPool
Local connector pool
-
threadContext
protected final IThreadContext threadContext
Thread context
-
-
Constructor Detail
-
TransformationConnectorPool
public TransformationConnectorPool(IThreadContext threadContext) throws ManifoldCFException
Constructor- Throws:
ManifoldCFException
-
-
Method Detail
-
grabMultiple
public ITransformationConnector[] grabMultiple(java.lang.String[] orderingKeys, ITransformationConnection[] transformationConnections) throws ManifoldCFException
Get multiple transformation connectors, all at once. Do this in a particular order so that any connector exhaustion will not cause a deadlock.- Specified by:
grabMultiplein interfaceITransformationConnectorPool- Parameters:
orderingKeys- are the keys which determine in what order the connectors are obtained.transformationConnections- are the connections to use the build the connector instances.- Throws:
ManifoldCFException
-
grab
public ITransformationConnector grab(ITransformationConnection transformationConnection) throws ManifoldCFException
Get a transformation connector. The connector is specified by a transformation connection object.- Specified by:
grabin interfaceITransformationConnectorPool- Parameters:
transformationConnection- is the transformation connection to base the connector instance on.- Throws:
ManifoldCFException
-
releaseMultiple
public void releaseMultiple(ITransformationConnection[] connections, ITransformationConnector[] connectors) throws ManifoldCFException
Release multiple transformation connectors.- Specified by:
releaseMultiplein interfaceITransformationConnectorPool- Parameters:
connections- are the connections describing the instances to release.connectors- are the connector instances to release.- Throws:
ManifoldCFException
-
release
public void release(ITransformationConnection connection, ITransformationConnector connector) throws ManifoldCFException
Release a transformation connector.- Specified by:
releasein interfaceITransformationConnectorPool- Parameters:
connection- is the connection describing the instance to release.connector- is the connector to release.- Throws:
ManifoldCFException
-
pollAllConnectors
public void pollAllConnectors() throws ManifoldCFExceptionIdle notification for inactive transformation connector handles. This method polls all inactive handles.- Specified by:
pollAllConnectorsin interfaceITransformationConnectorPool- Throws:
ManifoldCFException
-
flushUnusedConnectors
public void flushUnusedConnectors() throws ManifoldCFExceptionFlush only those connector handles that are currently unused.- Specified by:
flushUnusedConnectorsin interfaceITransformationConnectorPool- Throws:
ManifoldCFException
-
closeAllConnectors
public void closeAllConnectors() throws ManifoldCFExceptionClean up all open output connector handles. This method is called when the connector pool needs to be flushed, to free resources.- Specified by:
closeAllConnectorsin interfaceITransformationConnectorPool- Throws:
ManifoldCFException
-
-