AgentPool.BoundPool, AgentPool.UnboundPool
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,Agent> |
connections
The reserved agent, for each connection.
|
private boolean |
free
Flag indicating this is a STATE-FREE mode.
|
persistentProcedures
Constructor and Description |
---|
UnboundPool(AppServerDefinition appDef,
boolean free)
Build a new agent pool, for the specified appserver.
|
Modifier and Type | Method and Description |
---|---|
(package private) Agent |
acquireAgent(java.lang.String id,
java.lang.String code,
int agentId)
Get the agent associated with the given connection id.
|
(package private) java.lang.String |
newConnection()
Establish a new connection.
|
(package private) void |
releaseAgent(java.lang.String id,
Agent agent)
Release the given agent and place it back in the pool, but only if is still unbound.
|
(package private) void |
removeProcedure(java.lang.String id,
java.lang.Object referent)
Remove the specified persistent procedure.
|
(package private) void |
terminateConnection(java.lang.String id,
boolean running)
Terminate the connection with the given ID and unbind the agent.
|
acquireAgent, addProcedure, connect, disableLegacyErrors, disconnect, getActivate, getAgent, getAppserver, getDeactivate, getExports, getFromMainPool, getName, getOperatingMode, getPropath, getServerConnectionContext, getShutdown, getStartup, getStartupParameter, hasProcedure, isDisabledLegacyErrors, isEmpty, isPasoe, newPool, nextId, poolAgent, removeAgent, setExports, setServerConnectionContext, size, start, terminateAll, trimAgents
private final java.util.Map<java.lang.String,Agent> connections
private final boolean free
UnboundPool(AppServerDefinition appDef, boolean free)
appDef
- The appserver definition.free
- Flag indicating this is a STATE-FREE mode.Agent acquireAgent(java.lang.String id, java.lang.String code, int agentId) throws NumberedException
acquireAgent
in class AgentPool
id
- The connection ID.code
- The code of a persistent external procedure to which the agent is associated.
May be null
.agentId
- When non-negative, the agent ID which created the persistent procedure.NumberedException
- If there was no agent available.void releaseAgent(java.lang.String id, Agent agent)
releaseAgent
in class AgentPool
id
- The connection ID.agent
- The agent which needs to be released.java.lang.String newConnection()
newConnection
in class AgentPool
void terminateConnection(java.lang.String id, boolean running)
terminateConnection
in class AgentPool
id
- The connection ID.running
- Flag indicating the Agent is already processing a command.void removeProcedure(java.lang.String id, java.lang.Object referent)
removeProcedure
in class AgentPool
id
- The connection ID.referent
- The persistent procedure.