ARLO Adapt
Public Member Functions | Static Public Member Functions | List of all members
arlo.QueueRunner Class Reference

Main class for running through the Nester Database work queue and executing jobs. More...

Inheritance diagram for arlo.QueueRunner:
Inheritance graph
[legend]
Collaboration diagram for arlo.QueueRunner:
Collaboration graph
[legend]

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...
 

Detailed Description

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.

Member Function Documentation

void arlo.QueueRunner.run ( )
static int arlo.QueueRunner.runQueue ( Vector< QueueTask taskHandlers,
Vector< NesterUser restrictedUsers,
int  maxTasks 
)
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.

Parameters
taskHandlersA Vector of QueueTask subclasses, each checking a specific task.
restrictedUsersA 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.
maxTasksIf > 0, the maximum number of tasks to run before returning from this function.
Note
The queue is processed first in the order of the handlers, then in the order of the users in the Vectors... keep this in mind if prioritizing tasks or users.
Returns
The number of tasks found and executed.
boolean arlo.QueueRunner.startDaemon ( int  checkIntervalSeconds,
Vector< QueueTask taskHandlers,
Vector< NesterUser restrictedUsers 
)

The documentation for this class was generated from the following file: