lima.distribution
Class LocalProcessor

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--lima.distribution.LocalProcessor
All Implemented Interfaces:
java.rmi.Remote, java.lang.Runnable, WorkUnitProcessor

public class LocalProcessor
extends java.lang.Thread
implements WorkUnitProcessor

This implements a WorkUnitProcessor in the local JVM. Use me for testing. This class can be used to test the distribution of the algorithm without neededing a distribution system. It runs the wus in a thread on the current JVM.


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
LocalProcessor()
           
 
Method Summary
 void process(lima.distribution.WorkUnitSink sink, lima.distribution.WorkUnitSource source)
          Take WorkUnits from source, process them and flush them to sink.
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalProcessor

public LocalProcessor()
Method Detail

process

public void process(lima.distribution.WorkUnitSink sink,
                    lima.distribution.WorkUnitSource source)
             throws java.rmi.RemoteException
Description copied from interface: WorkUnitProcessor
Take WorkUnits from source, process them and flush them to sink. Note that order is not maintained.

Specified by:
process in interface WorkUnitProcessor
Parameters:
source - - Provides WorkUnits
sink - - Callback to flush finished workunits.
java.rmi.RemoteException
See Also:
WorkUnitProcessor.process(lima.distribution.WorkUnitSink, lima.distribution.WorkUnitSource)

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread