| java.lang.Object org.columba.core.command.CommandProcessor
CommandProcessor | public class CommandProcessor implements Runnable(Code) | | Scheduler for background threads
DefaultProcessor keeps a pool of
Worker instances, which are assigned
to
Command , when executed.
author: tstich |
MAX_WORKERS | final public static int MAX_WORKERS(Code) | | |
operationQueue | List<OperationItem> operationQueue(Code) | | |
CommandProcessor | public CommandProcessor()(Code) | | |
CommandProcessor | public CommandProcessor(boolean start)(Code) | | Constructs a DefaultProcessor.
|
addOp | public void addOp(Command op, int operationMode)(Code) | | Adds a Command to the queue.
Parameters: op - the command Parameters: operationMode - the mode in wich the command should be processed |
getWorker | Worker getWorker(int priority)(Code) | | Get an available Worker from the workerpool. Reserve one worker for
Real-Time Priority tasks
Parameters: priority - an available worker or null if none available. |
operationFinished | public void operationFinished(ICommand op, Worker w)(Code) | | Called by the worker to signal that his operation has finished.
Parameters: op - the command the worker has processed Parameters: w - the worker himself |
startOperation | boolean startOperation()(Code) | | Parameters: sleep - |
stop | public synchronized void stop()(Code) | | |
|
|