ARLO Adapt
|
Main class for running through the Nester Database work queue and executing jobs. More...
Public Member Functions | |
boolean | startDaemon (int checkIntervalSeconds, Vector< QueueTask > taskHandlers, Vector< NesterUser > restrictedUsers) |
void | run () |
Static Public Member Functions | |
static int | runQueue (Vector< QueueTask > taskHandlers, Vector< NesterUser > restrictedUsers, int maxTasks) |
Loop over a list of QueueTask handlers, having them check and execute work. More... | |
Main class for running through the Nester Database work queue and executing jobs.
This class doesn't actually execute any work, or even access the database. This class is only a wrapper around all of the QueueTask handlers. It calls each handler, having them check for and execute work.
void arlo.QueueRunner.run | ( | ) |
|
static |
Loop over a list of QueueTask handlers, having them check and execute work.
This is a one-shot function. It calls all handlers in the provided list, having them perform the actual database check and work.
taskHandlers | A Vector of QueueTask subclasses, each checking a specific task. |
restrictedUsers | A Vector of users to check work from. Useful if the QueueRunner is running under a specific user's machine or account, and shouldn't execute other users' tasks. If this list is null, then all users' tasks will be run. |
maxTasks | If > 0, the maximum number of tasks to run before returning from this function. |
boolean arlo.QueueRunner.startDaemon | ( | int | checkIntervalSeconds, |
Vector< QueueTask > | taskHandlers, | ||
Vector< NesterUser > | restrictedUsers | ||
) |