ePOST API

rice.environment.processing
Interface Processor

All Superinterfaces:
Destructable
All Known Implementing Classes:
SimpleProcessor, SimProcessor

public interface Processor
extends Destructable

Author:
Jeff Hoye

Method Summary
 void destroy()
          Shuts down the processing thread.
 void process(Executable task, Continuation command, SelectorManager selector, TimeSource ts, LogManager log)
          Schedules a job for processing on the dedicated processing thread.
 void processBlockingIO(WorkRequest request)
          Schedules a different type of task.
 

Method Detail

process

void process(Executable task,
             Continuation command,
             SelectorManager selector,
             TimeSource ts,
             LogManager log)
Schedules a job for processing on the dedicated processing thread. CPU intensive jobs, such as encryption, erasure encoding, or bloom filter creation should never be done in the context of the underlying node's thread, and should only be done via this method. The continuation will be called on the Selector thread.

Parameters:
task - The task to run on the processing thread
command - The command to return the result to once it's done

processBlockingIO

void processBlockingIO(WorkRequest request)
Schedules a different type of task. This thread is for doing Disk IO that is required to be blocking.

Parameters:
request -

destroy

void destroy()
Shuts down the processing thread.

Specified by:
destroy in interface Destructable

ePOST API

Copyright © 2001-2005 - Rice Pastry.