protected class ConnectorPool.Pool extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
globalMax
The global maximum for this pool
|
protected boolean |
isAlive
Whether this pool is alive
|
protected int |
localInUse
The number of instances that are actually connected and in use, as of the last poll
|
protected int |
localMax
The number of instances we are allowed to hand out locally, at this time
|
protected int |
numFree
The number of local instances we can currently pass out to requesting threads.
|
protected String |
serviceName
The (anonymous) service name
|
protected String |
serviceTypeName
Service type name
|
protected List<T> |
stack
Place where we keep unused connector instances
|
protected String |
targetCalcLockName
The target calculation lock name
|
Constructor and Description |
---|
ConnectorPool.Pool(IThreadContext threadContext,
int maxCount,
String connectionName)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
flushUnused(IThreadContext threadContext)
Flush unused connectors.
|
T |
getConnector(IThreadContext threadContext,
String className,
ConfigParams configParams)
Grab a connector.
|
void |
pollAll(IThreadContext threadContext)
Notify all free connectors.
|
void |
releaseAll(IThreadContext threadContext)
Release all free connectors.
|
void |
releaseConnector(IThreadContext threadContext,
T connector)
Release a connector to the pool.
|
void |
updateMaximumPoolSize(IThreadContext threadContext,
int maxPoolSize)
Update the maximum pool size.
|
protected boolean isAlive
protected int globalMax
protected final String serviceTypeName
protected final String serviceName
protected final String targetCalcLockName
protected final List<T extends IConnector> stack
protected int numFree
protected int localMax
protected int localInUse
public ConnectorPool.Pool(IThreadContext threadContext, int maxCount, String connectionName) throws ManifoldCFException
ManifoldCFException
public void updateMaximumPoolSize(IThreadContext threadContext, int maxPoolSize) throws ManifoldCFException
maxPoolSize
- is the new global maximum pool size.ManifoldCFException
public T getConnector(IThreadContext threadContext, String className, ConfigParams configParams) throws ManifoldCFException
ManifoldCFException
public void releaseConnector(IThreadContext threadContext, T connector) throws ManifoldCFException
connector
- is the connector.ManifoldCFException
public void pollAll(IThreadContext threadContext) throws ManifoldCFException
ManifoldCFException
public void flushUnused(IThreadContext threadContext) throws ManifoldCFException
ManifoldCFException
public void releaseAll(IThreadContext threadContext) throws ManifoldCFException
ManifoldCFException