org.apache.manifoldcf.authorities.interfaces
Class AuthorityConnectorFactory.Pool

java.lang.Object
  extended by org.apache.manifoldcf.authorities.interfaces.AuthorityConnectorFactory.Pool
Enclosing class:
AuthorityConnectorFactory

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

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


Field Summary
protected  AuthorityConnectorFactory.PoolKey key
           
protected  int numFree
           
protected  java.util.ArrayList stack
           
 
Constructor Summary
AuthorityConnectorFactory.Pool(AuthorityConnectorFactory.PoolKey pk, int maxCount)
          Constructor
 
Method Summary
 IAuthorityConnector getConnector(IThreadContext threadContext)
          Grab a repository connector.
 void pollAll(IThreadContext threadContext)
          Notify all free connectors.
 void releaseAll(IThreadContext threadContext)
          Release all free connectors.
 void releaseConnector(IAuthorityConnector connector)
          Release a repository 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 AuthorityConnectorFactory.PoolKey key

numFree

protected int numFree
Constructor Detail

AuthorityConnectorFactory.Pool

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

Method Detail

getConnector

public IAuthorityConnector getConnector(IThreadContext threadContext)
                                 throws ManifoldCFException
Grab a repository connector. If none exists, construct it using the information in the pool key.

Returns:
the connector.
Throws:
ManifoldCFException

releaseConnector

public void releaseConnector(IAuthorityConnector connector)
                      throws ManifoldCFException
Release a repository 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