public class SyncManager extends TaskManager implements java.lang.Runnable
handleTask method of the TaskHandler when it gets
a transaction record from TASK NEXT.
| Modifier and Type | Field and Description |
|---|---|
protected TaskHandler |
handler
TaskHandler instance that will be called to process a task
|
pool, task, trans_ms, transid| Constructor and Description |
|---|
SyncManager(java.lang.String taskCode,
PoolableObjectFactory factory,
TaskHandler handler)
Creates a new SyncManager.
|
SyncManager(java.lang.String taskCode,
java.lang.String hosts,
TaskHandler handler)
Creates a new SyncManager.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getTimeout()
Gets the timeout that is used when the main loop goes to sleep
|
void |
kill()
Sets a flag indicating that the sync manager should stop.
|
void |
listen()
Starts the main processing loop for the sync manager, created in a new thread.
|
boolean |
listening()
Checks to see if this sync manager is listening
|
void |
run()
The main task processing loop for the sync manager
|
void |
setTimeout(long milliseconds)
Sets the timeout value that is used when the main loop goes to sleep
negative values will be silently ignored, and the timeout will not change
|
void |
wakeUp()
Calls notify on this object, to wake up the main loop if it is in
wait |
alive, getParameters, incrementalBeat, taskBeat, taskEnd, taskError, taskNext, taskSession, taskStartprotected TaskHandler handler
public SyncManager(java.lang.String taskCode,
java.lang.String hosts,
TaskHandler handler)
ClientFactorytaskCode - the code for this taskhosts - the hosts string used to make new Client objects by ClientFactoryhandler - the task handler that will be called when a task is ready to be processedpublic SyncManager(java.lang.String taskCode,
PoolableObjectFactory factory,
TaskHandler handler)
taskCode - the code for this taskfactory - the factory used by the internal ExecutorPool for Executor objectshandler - the task handler that will be called when a task is ready to be processedpublic void run()
run in interface java.lang.Runnablepublic void listen()
public void wakeUp()
waitpublic long getTimeout()
public void setTimeout(long milliseconds)
milliseconds - the new timeout in millisecondspublic boolean listening()
public void kill()
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.