public class PendingOperationTaskProvider extends Object implements IPollQueueTaskProvider
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(IPendingOperationListener l) |
IPendingOperationExecutor |
findExecutor(PendingOperation po)
Find an executor for a given pendingOperation type.
|
PendingJobProgressInfo |
getCurrentProgress(String externalId)
Gets current progress of a scheduled or running calculation of a given scenario (externalId)
|
static PendingOperationTaskProvider |
getInstance() |
Runnable |
getRunnableTask()
This checks for a new pending operation to execute.
|
static void |
initialize(DataSource ds,
String serverID)
Initializes this thing, and adds it to the worker queue handler.
|
void |
initializeOnRegistration(PollingWorkerQueue pwq) |
boolean |
isBusyWithJob(String externalId)
Checks to see if there already is scheduled or running calculation of a given scenario (externalId).
|
void |
registerPendingOperationType(String type,
IPendingOperationExecutor pox)
Register a pending operation type and it's executor.
|
void |
removeListener(IPendingOperationListener l) |
void |
saveOperation(PendingOperation po,
Serializable object)
Store a PendingOperation in the table, or die.
|
void |
saveOperation(PendingOperation po,
StringInputStream sis)
Store a PendingOperation in the table, or die.
|
protected void |
updateProgress(PendingOperation po)
Updates the current progress of a given pending operation.
|
public static void initialize(DataSource ds, String serverID)
serverID - public static PendingOperationTaskProvider getInstance()
public void addListener(IPendingOperationListener l)
public void removeListener(IPendingOperationListener l)
public void initializeOnRegistration(PollingWorkerQueue pwq) throws Exception
initializeOnRegistration in interface IPollQueueTaskProviderExceptionpublic Runnable getRunnableTask() throws Exception
getRunnableTask in interface IPollQueueTaskProviderExceptionIPollQueueTaskProvider.getRunnableTask()public void registerPendingOperationType(String type, IPendingOperationExecutor pox)
type - pox - public IPendingOperationExecutor findExecutor(PendingOperation po)
po - public void saveOperation(PendingOperation po, StringInputStream sis) throws Exception
po - sis - Exceptionpublic void saveOperation(PendingOperation po, Serializable object) throws Exception
po - sis - Exceptionprotected void updateProgress(PendingOperation po) throws SQLException
po - SQLExceptionpublic PendingJobProgressInfo getCurrentProgress(String externalId) throws SQLException
externalId - SQLExceptionpublic boolean isBusyWithJob(String externalId) throws SQLException
externalId - SQLExceptionCopyright © 2017 etc.to. All rights reserved.