org.apache.manifoldcf.agents.interfaces
Class OutputConnectorFactory.Pool

java.lang.Object
  extended by org.apache.manifoldcf.agents.interfaces.OutputConnectorFactory.Pool
Enclosing class:
OutputConnectorFactory

public static class OutputConnectorFactory.Pool
extends java.lang.Object

This class represents a value in the pool hash, which corresponds to a given key.


Field Summary
protected  OutputConnectorFactory.PoolKey key
           
protected  int numFree
           
protected  java.util.ArrayList stack
           
 
Constructor Summary
OutputConnectorFactory.Pool(OutputConnectorFactory.PoolKey pk, int maxCount)
          Constructor
 
Method Summary
 IOutputConnector getConnector(IThreadContext threadContext)
          Grab an output connector.
 void pollAll(IThreadContext threadContext)
          Notify all free connectors.
 void releaseAll(IThreadContext threadContext)
          Release all free connectors.
 void releaseConnector(IOutputConnector connector)
          Release an output connector to the pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stack

protected java.util.ArrayList stack

key

protected OutputConnectorFactory.PoolKey key

numFree

protected int numFree
Constructor Detail

OutputConnectorFactory.Pool

public OutputConnectorFactory.Pool(OutputConnectorFactory.PoolKey pk,
                                   int maxCount)
Constructor

Method Detail

getConnector

public IOutputConnector getConnector(IThreadContext threadContext)
                              throws ManifoldCFException
Grab an output connector. If none exists, construct it using the information in the pool key.

Returns:
the connector, or null if no connector could be connected.
Throws:
ManifoldCFException

releaseConnector

public void releaseConnector(IOutputConnector connector)
                      throws ManifoldCFException
Release an output connector to the pool.

Parameters:
connector - is the connector.
Throws:
ManifoldCFException

pollAll

public void pollAll(IThreadContext threadContext)
             throws ManifoldCFException
Notify all free connectors.

Throws:
ManifoldCFException

releaseAll

public void releaseAll(IThreadContext threadContext)
                throws ManifoldCFException
Release all free connectors.

Throws:
ManifoldCFException