public class TaskManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ExecutorPool |
pool
Executor object pool for this task
|
protected java.lang.String |
task
The Task Code for this task
|
protected java.lang.Long |
trans_ms |
protected java.lang.String |
transid
The current Transaction ID for this task
|
Constructor and Description |
---|
TaskManager(java.lang.String taskCode,
PoolableObjectFactory factory)
Creates a new TaskManager for the given task code, using the factory to create
an ExecutorPool
|
Modifier and Type | Method and Description |
---|---|
boolean |
alive()
Returns true if this task manager is currently live
|
java.lang.String |
getParameters()
get the parameters
|
static boolean |
incrementalBeat()
do a incremental beat on the current task manager.
|
boolean |
taskBeat()
Calls TASK BEAT using the session id and the transaction id from TASK NEXT
|
void |
taskEnd()
Calls TASK END for this session, end the session and allow another session to start
|
boolean |
taskError(java.lang.String msg)
Calls TASK ERROR using the session id and the transaction id from TASK NEXT
|
boolean |
taskNext()
Calls TASK NEXT using the session from taskStart for this task.
|
java.lang.String |
taskSession()
Calls TASK SESSION using the session id and the transaction id from TASK NEXT
|
boolean |
taskStart()
Calls TASK START for the task given in the constructor, stores the resulting
session and mode for use in TASK NEXT and TASK BEAT
|
protected java.lang.String task
protected ExecutorPool pool
protected java.lang.String transid
protected java.lang.Long trans_ms
public TaskManager(java.lang.String taskCode, PoolableObjectFactory factory)
taskCode
- the task code for the appfactory
- an Executor object factory for the poolpublic boolean taskStart() throws java.lang.Exception
java.lang.Exception
- a serious problempublic boolean taskNext() throws java.lang.Exception
java.lang.Exception
- a serious problempublic static boolean incrementalBeat()
public boolean taskBeat()
public java.lang.String taskSession()
public void taskEnd() throws java.lang.Exception
java.lang.Exception
- a serious problempublic boolean alive()
public boolean taskError(java.lang.String msg) throws java.lang.Exception
msg
- the messagejava.lang.Exception
- a serious problem@CheckReturnValue @Nonnull public java.lang.String getParameters()
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.