edu.cuny.brooklyn.swc2
Interface Computation
- All Superinterfaces:
- java.lang.Runnable
- All Known Implementing Classes:
- FactorialComputation, ParticleComputation, ParticleComputation, ParticleComputation, PingPongComputation
public interface Computation
- extends java.lang.Runnable
Computation is the interface to be implemented by a class that will be instantiated
by the SWC2 system in order to generate WorkUnit
's and collect ResultUnit
's.
The implementing class is also required to define the Runnable.run()
method, which will
be called (potentially in a separate thread) to do all the necessary work by the computation.
- Author:
- Dino Klein
Method Summary |
void |
loadConfiguration(java.util.Map config,
WorkQueueAccess wqa,
java.io.OutputStream os)
Invoked by the SWC2 system in order to initialize the computation with the user supplied
parameters. |
Methods inherited from interface java.lang.Runnable |
run |
loadConfiguration
void loadConfiguration(java.util.Map config,
WorkQueueAccess wqa,
java.io.OutputStream os)
throws java.lang.Exception
- Invoked by the SWC2 system in order to initialize the computation with the user supplied
parameters.
- Parameters:
config
- The key/value pairs passed as initialization values for the computation.wqa
- The object through which the computation will submit work units and collect result units.os
- An output stream opened by the swc2 system, to be used by the computation for any output.
- Throws:
java.lang.Exception
- Any exception during initialization will caught by the swc2 system
and the computation will be terminated.- See Also:
WorkQueueAccess