|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IWorkerProcess
A worker process is managed by the home process as explained in IHomeLayout.
Worker process component definitions have no resources beyond a property sheet. A worker process definition typically looks like this:
com.zfabrik.component.type=com.zfabrik.worker # worker configuration # # target states # worker.states=environment/webWorkerUp # # max worker thread pool concurrency # worker.concurrency=15 # # debug port # worker.debug.port=5001 # # timeout (in ms) before the worker will be forcefully killed at worker stop # worker.process.timeouts.termination=20000 # # vm options # worker.process.vmOptions=\ -Xmx128m -Xms128m -XX:+HeapDumpOnOutOfMemoryError \ -Duser.language=en \ -Dcom.sun.management.jmxremote.port=7778
Properties in detail:
http://blogs.sun.com/watt/resource/jvm-options-list.html for a general overview.
ISystemState.
The worker process, when starting, will
try to attain these target states and will try so again
during each verification and synchronization.
ApplicationThreadPool). In general this thread
pool is used for application type work (e.g. for web requests or parallel execution within
the application). This property helps achieving a simple but effective
concurrent load control
true and the home process has debugging enabled.
Otherwise the worker process will not be configured for debugging.
WORKER_DEBUG)
| Field Summary | |
|---|---|
static String |
DEBUG_PORT
The debug port to use for this worker process, if it is configured for debugging (see WORKER_DEBUG) |
static String |
MSG_NODE
msg header providing id of target node if one specific |
static String |
MSG_TARGET
msg header describing the target of a message |
static String |
MSG_TARGET_ALL
|
static String |
MSG_TARGET_HOME
|
static String |
MSG_TARGET_NODE
|
static String |
MSG_TIMEOUT
msg header providing the time out of the message operation (per node). |
static short |
NOT_STARTED
|
static short |
STARTED
|
static short |
STARTING
|
static String |
STATES
Target states of the worker process (see also ISystemState. |
static short |
STOPPING
|
static String |
TO_MSG
Timeout in milliseconds. |
static String |
TO_MSG_DEF
|
static String |
TO_START
Timeout in milliseconds. |
static String |
TO_START_DEF
|
static String |
TO_TERM
Timeout in milliseconds. |
static String |
TO_TERM_DEF
|
static String |
VMOPTS
General virtual machine parameters for the worker process. |
static String |
WORKER_CONCURRENCY
Size of application thread pool (see ApplicationThreadPool). |
static String |
WORKER_DEBUG
Debugging for the worker process will be configured if this property is set to true and the home process has debugging enabled. |
| Method Summary | |
|---|---|
short |
getState()
get the state of this worker |
Map<String,Serializable> |
sendMessage(Map<String,Serializable> args,
long timeout)
send a message to the process. |
Map<String,Serializable> |
sendMessage(Map<String,Serializable> args,
long timeout,
boolean killOnTimeOut)
send a message to the process. |
void |
start()
start this worker |
void |
stop()
Stop this worker |
| Field Detail |
|---|
static final String VMOPTS
http://blogs.sun.com/watt/resource/jvm-options-list.html for a general overview.
static final String STATES
ISystemState.
The worker process, when starting, will
try to attain these target states and will try so again
during each verification and synchronization.
static final String TO_START
static final String TO_TERM
static final String TO_MSG
static final String WORKER_CONCURRENCY
ApplicationThreadPool). In general this thread
pool is used for application type work (e.g. for web requests or parallel execution within
the application). This property helps achieving a simple but effective
concurrent load control
static final String WORKER_DEBUG
true and the home process has debugging enabled.
Otherwise the worker process will not be configured for debugging.
static final String DEBUG_PORT
WORKER_DEBUG)
static final String TO_START_DEF
static final String TO_TERM_DEF
static final String TO_MSG_DEF
static final String MSG_TARGET
static final String MSG_TARGET_NODE
static final String MSG_TARGET_ALL
static final String MSG_TARGET_HOME
static final String MSG_NODE
static final String MSG_TIMEOUT
static final short NOT_STARTED
static final short STARTING
static final short STARTED
static final short STOPPING
| Method Detail |
|---|
Map<String,Serializable> sendMessage(Map<String,Serializable> args,
long timeout)
throws IOException
args - a map of name value pairs that will be serialized as strings
to the slavetimeout - timeout for message answering in ms.
IOException
Map<String,Serializable> sendMessage(Map<String,Serializable> args,
long timeout,
boolean killOnTimeOut)
throws IOException
args - a map of name value pairs that will be serialized as strings
to the slavetimeout - timeout for message answering in ms.killOnTimeOut - if true a timeout will lead to a process termination.
IOExceptionvoid stop()
void start()
short getState()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||