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.
|
private java.util.Map<java.lang.String,Agent> |
procedures
Map of procedure codes to their associated agent.
|
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)
Get the agent associated with the given connection id.
|
private Agent |
getByCode(java.lang.String procId)
Get the agent associated with the procedure identified by the given code.
|
(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) PersistentProcedure |
removeProcedure(java.lang.String id,
java.lang.String procId)
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.
|
connect, deleteProcedure, disconnect, getActivate, getAppserver, getDeactivate, getExports, getFromMainPool, getName, getOperatingMode, getProcedure, getPropath, getShutdown, getStartup, getStartupParameter, hasProcedure, isEmpty, newPool, nextId, poolAgent, removeAgent, saveProcedure, setExports, size, start, terminateAll, trimAgents
private final java.util.Map<java.lang.String,Agent> connections
private final boolean free
private final java.util.Map<java.lang.String,Agent> procedures
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)
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
.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.PersistentProcedure removeProcedure(java.lang.String id, java.lang.String procId)
removeProcedure
in class AgentPool
id
- The connection ID.procId
- The procedure ID.private Agent getByCode(java.lang.String procId)
procId
- The code of a persistent external procedure to which the agent is associated.