|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.environment.processing.simple.SimpleProcessor
public class SimpleProcessor
Field Summary | |
---|---|
protected BlockingIOThread |
bioThread
|
protected java.util.concurrent.PriorityBlockingQueue<ProcessingRequest> |
QUEUE
|
protected ProcessingThread |
THREAD
|
protected WorkQueue |
workQueue
|
Constructor Summary | |
---|---|
SimpleProcessor(java.lang.String name)
|
Method Summary | ||
---|---|---|
void |
destroy()
Shuts down the processing thread. |
|
WorkQueue |
getIOQueue()
|
|
java.util.Queue<ProcessingRequest> |
getQueue()
|
|
static void |
main(java.lang.String[] args)
This is a test to make sure the order is correct. |
|
|
process(Executable<R,E> task,
Continuation<R,E> command,
int priority,
SelectorManager selector,
TimeSource ts,
LogManager log)
Schedules a job for processing on the dedicated processing thread. |
|
|
process(Executable<R,E> task,
Continuation<R,E> command,
SelectorManager selector,
TimeSource ts,
LogManager log)
Schedules a job for processing on the dedicated processing thread. |
|
Cancellable |
processBlockingIO(WorkRequest workRequest)
Schedules a different type of task. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.concurrent.PriorityBlockingQueue<ProcessingRequest> QUEUE
protected ProcessingThread THREAD
protected WorkQueue workQueue
protected BlockingIOThread bioThread
Constructor Detail |
---|
public SimpleProcessor(java.lang.String name)
Method Detail |
---|
public <R,E extends java.lang.Exception> Cancellable process(Executable<R,E> task, Continuation<R,E> command, SelectorManager selector, TimeSource ts, LogManager log)
process
in interface Processor
task
- The task to run on the processing threadcommand
- The command to return the result to once it's donepublic <R,E extends java.lang.Exception> Cancellable process(Executable<R,E> task, Continuation<R,E> command, int priority, SelectorManager selector, TimeSource ts, LogManager log)
Processor
process
in interface Processor
task
- The task to run on the processing threadcommand
- The command to return the result to once it's donepriority
- lower number is higher priority, 0 is default priority, and negative numbers are high prioritypublic Cancellable processBlockingIO(WorkRequest workRequest)
Processor
processBlockingIO
in interface Processor
public java.util.Queue<ProcessingRequest> getQueue()
public void destroy()
Processor
destroy
in interface Destructable
destroy
in interface Processor
public WorkQueue getIOQueue()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |