|
HPSearch | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcgl.hpsearch.engine.TaskSchedulerEngine
The task scheduler engine helps to distribute activities to disparate nodes.
As each request comes in, it spawns off a new RequestHandler.
The RequestHandler then reads the request and starts the appropriate
Handler.
RequestHandler,
Handler| Field Summary |
| Fields inherited from interface cgl.hpsearch.common.SystemConstants |
ABANDON_HANDLER, ABANDONED, BROKER_HOST, BROKER_PORT, BUF_SIZE, EOT, EXCEPTION, FAILURE, FILESEPARTOR, FLOW_LOGGING_MANAGER, FLOW_MANAGER, HPSEARCH_CONFIG, HPSEARCH_HOME, HPSEARCH_SHELL, HPSEARCH_WS, MARKER, NB_HOME, NB_PERFORMANCE_DATA_TOPIC, OS_TYPE, OS_UNIX, OS_WIN, PORT, PROTOCOL, READY, RESUME, RUNNING, SCRIPT_ARGS, SCRIPT_PATH, SHELLWS_PORT, START_HANDLER, STREAM_MARKER_DATA, STREAM_MARKER_EOF, STX, SUCCESS, SUSPEND, TASK_DEFINED, TASK_SCHEDULER_ENGINE, TASKSCHEDULER_AUTO_CONNECT_COMM_LINK, TASKSCHEDULER_ENGINE_COMM_LINK, THREAD_SLEEP_INTERVAL, UNKNOWN, WAITING, WSCONTEXT_RESULT_BIN, WSCONTEXT_SERVICE |
| Constructor Summary | |
TaskSchedulerEngine()
Initializes a TaskSchedulerEngine. |
|
| Method Summary | |
String |
getEngine(int engine)
Returns the id of the best possible engine to run this particular task |
int |
getFlowStatus(String flowID)
Returns the status of the specified flow |
void |
handlerFinished(RequestHandler rh)
Called by the RequestHandlers to tell the TaskSchedulerEngine that it is done with the task assigned to it. |
void |
onTimerExpiry(Object o)
If a timer expires for a particular engine we just assume the engine to be dead. |
void |
processEvent(Object o)
Processes an event sent from another engine to this engine... |
TaskHandler |
processFlowRequest(Vector flowComponents,
String flowID)
Creates a new TaskHandler that handles the flow specified by the flowComponents |
void |
requestHandlerRegistered(RequestHandler rh)
Requests the TaskSchedulerengine to register the init stage of te RequestHandler. |
void |
sendEventMessage(HandlerEvent msg,
RequestHandler _rh)
Sends the Event message to the specified Engine |
void |
sendTaskSchedulerEvent(String event)
Sends the command to the Engine running on another node. |
void |
startEngine()
Initializes the TaskScheduler engine instance. |
void |
stopEngine()
Stops the TaskScheduler engine. sends the "GOODBYE" event to all engines to signify graceful shutdown |
boolean |
tryInitCOMMLink(String h,
int p,
String prot)
Tries to initialize the communication link to a broker using the protocol specified as defined by the following parameters |
void |
waitForFlowToStart(String flowID)
Waits for the specified flow to start |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TaskSchedulerEngine()
| Method Detail |
public void startEngine()
public boolean tryInitCOMMLink(String h,
int p,
String prot)
h - -
Host of the brokerp - -
Port to which connection must be triedprot - -
Protocol to use
public void stopEngine()
public void processEvent(Object o)
o - Object representing the event
public void requestHandlerRegistered(RequestHandler rh)
rh - -
The RequestHandlerpublic void onTimerExpiry(Object o)
onTimerExpiry in interface TimerExpiryListener
public TaskHandler processFlowRequest(Vector flowComponents,
String flowID)
flowComponents - The components of the flowflowID - The unique flow ID
public void waitForFlowToStart(String flowID)
flowID - -
The ID representing the flowHandler in questionpublic int getFlowStatus(String flowID)
flowID - -
the UUID of the flow
public void handlerFinished(RequestHandler rh)
public void sendEventMessage(HandlerEvent msg,
RequestHandler _rh)
msg - -
The message to be sentpublic void sendTaskSchedulerEvent(String event)
event - event as an XML stringpublic String getEngine(int engine)
|
HPSearch | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||