|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.server.AssemblyLinePool
public final class AssemblyLinePool
This class implements a pool of AssemblyLines. The purpose of this pool is to make using AssemblyLines more efficient by re-using AssemblyLine objects. This pool is especially useful when Server mode Connectors are used in an AssemblyLine. By configuring a pool of AssemblyLines it is possible to speed up the processing of requests directed at a Server mode Connector, because each request can be serviced by a different AssesmblyLine from the pool. Moreover when a request has been processed by an AssemblyLine object that object does not have to terminate (thus wasting system resources on AssemblyLine termination) but is returned to the pool to be used for servicing other requests.
Nested Class Summary | |
---|---|
class |
AssemblyLinePool.ALWorker
This is the worker thread that drives a client request. |
Field Summary | |
---|---|
static int |
TM_NEWAL_EVENT
|
static int |
TM_NEWAL_THREAD
|
static int |
TM_REUSE_AL
|
Constructor Summary | |
---|---|
AssemblyLinePool(String assemblyLine,
Log log,
RSInterface parent,
AssemblyLineConfig alConfig)
|
|
AssemblyLinePool(String assemblyLine,
Log log,
RSInterface parent,
AssemblyLineConfig alConfig,
int debugPort)
|
|
AssemblyLinePool(String assemblyLine,
Log log,
RSInterface parent,
AssemblyLineConfig alConfig,
String debugHost,
int debugPort,
boolean debugOnError,
Map<String,Boolean> componentDebugModes)
|
Method Summary | |
---|---|
void |
disableDebug(Object msg)
Remove the configured debugger. |
void |
enableDebug(int port,
String host,
boolean onerror)
Configure a debugger. |
Entry |
executeEvent(Thread source,
Entry event)
Called by a thread to execute a cycle in the AssemblyLine |
Entry |
executeEvent(Thread source,
Entry event,
boolean processTCB)
|
boolean |
getComponentDebugMode(String componentName)
Query the debug mode of the specified component (Connector or Function Component). |
long |
getConnectorPoolTimeout()
Returns the connector pool timeout in milliseconds. |
RSInterface |
getParent()
|
boolean |
hasRunningThreads()
Returns true if there are active eventhandlers using this ALPool as interceptor. |
void |
releaseAssemblyLine(Thread owner)
Called by a thread to release its reserved AssemblyLine instance. |
boolean |
runtimeConnectorTypeExcluded(ConnectorInterface connector)
Returns true if the connector type is excluded from pooling. |
void |
setComponentDebugMode(String componentName,
boolean debug)
Modify the debug mode of the specified component. |
void |
setConnectorPoolTimeout(long connectorPoolTimeout)
Sets the connector pool timeout in milliseconds. |
AssemblyLinePool.ALWorker |
startThread(String name,
ConnectorConfig config)
Starts a new thread with the provided connector config. |
AssemblyLinePool.ALWorker |
startThread(String name,
ConnectorInterface iterator)
Starts a new thread with the provided Iterator. |
AssemblyLinePool.ALWorker |
startThread(String name,
Entry workEntry)
Starts a new thread with the provided work entry. |
void |
terminate()
Called to block future calls from EventHandlers from executing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TM_NEWAL_THREAD
public static final int TM_NEWAL_EVENT
public static final int TM_REUSE_AL
Constructor Detail |
---|
public AssemblyLinePool(String assemblyLine, Log log, RSInterface parent, AssemblyLineConfig alConfig) throws Exception
Exception
public AssemblyLinePool(String assemblyLine, Log log, RSInterface parent, AssemblyLineConfig alConfig, int debugPort) throws Exception
Exception
public AssemblyLinePool(String assemblyLine, Log log, RSInterface parent, AssemblyLineConfig alConfig, String debugHost, int debugPort, boolean debugOnError, Map<String,Boolean> componentDebugModes) throws Exception
Exception
Method Detail |
---|
public AssemblyLinePool.ALWorker startThread(String name, ConnectorInterface iterator) throws Exception
Exception
public AssemblyLinePool.ALWorker startThread(String name, ConnectorConfig config) throws Exception
Exception
public AssemblyLinePool.ALWorker startThread(String name, Entry workEntry) throws Exception
Exception
public void releaseAssemblyLine(Thread owner)
owner
- The Thread object that previously called executeEvent)public long getConnectorPoolTimeout()
public void setConnectorPoolTimeout(long connectorPoolTimeout)
public boolean runtimeConnectorTypeExcluded(ConnectorInterface connector)
public boolean hasRunningThreads()
public Entry executeEvent(Thread source, Entry event) throws Exception
source
- The caller's thread objectevent
- The entry passed as the initial work entry
Exception
public Entry executeEvent(Thread source, Entry event, boolean processTCB) throws Exception
Exception
public void terminate()
public RSInterface getParent()
public boolean getComponentDebugMode(String componentName) throws Exception
componentName
- The name of the component as it appears in the configuration
of the AssemblyLine.
Exception
- If the component name is invalid.public void setComponentDebugMode(String componentName, boolean debug) throws Exception
componentName
- The name of the component.debug
- The new debug mode setting.
Exception
- If the component name is invalid.public void enableDebug(int port, String host, boolean onerror) throws Exception
port
- The TCP port number of the remote debugger clienthost
- The host name of the remote debugger clientonerror
- If true breakpoints are disabled except when there is an
error.
Exception
- If there is already a debugger, if the debugger cannot be
initialized or if the Pool size is more than one.public void disableDebug(Object msg)
msg
- Message to be sent.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |