Class NBodyTask
java.lang.Object
org.episteme.server.server.tasks.physics.nbody.NBodyTask
- All Implemented Interfaces:
Serializable, DistributedTask<NBodyTask, NBodyTask>
@AutoService(DistributedTask.class)
public class NBodyTask
extends Object
implements DistributedTask<NBodyTask, NBodyTask>
N-Body Simulation Task.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExecutes the computation for the given input chunk.Returns the expected input type class.Returns the expected output type class.Returns the unique task type identifier.voidvoidstep()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DistributedTask
getComplexity, getDescription, supportsGPU
-
Constructor Details
-
NBodyTask
-
NBodyTask
public NBodyTask()
-
-
Method Details
-
setMode
-
getInputType
Description copied from interface:DistributedTaskReturns the expected input type class.Used for deserialization and type checking during task dispatch.
- Specified by:
getInputTypein interfaceDistributedTask<NBodyTask, NBodyTask>- Returns:
- the Class object representing the input type
-
getOutputType
Description copied from interface:DistributedTaskReturns the expected output type class.Used for serialization and type checking during result collection.
- Specified by:
getOutputTypein interfaceDistributedTask<NBodyTask, NBodyTask>- Returns:
- the Class object representing the output type
-
execute
Description copied from interface:DistributedTaskExecutes the computation for the given input chunk.This method contains the core scientific algorithm. It receives a chunk of input data and returns the computed result. The infrastructure handles serialization, network transfer, and result aggregation.
- Specified by:
executein interfaceDistributedTask<NBodyTask, NBodyTask>- Parameters:
input- the input data for this computation chunk- Returns:
- the computed result
-
getTaskType
Description copied from interface:DistributedTaskReturns the unique task type identifier.This identifier is used by the task registry to locate and instantiate the appropriate task implementation. Examples: "MANDELBROT", "PROTEIN_FOLDING", "N_BODY", "CLIMATE_MODEL".
- Specified by:
getTaskTypein interfaceDistributedTask<NBodyTask, NBodyTask>- Returns:
- the task type identifier (non-null, uppercase with underscores)
-
step
public void step() -
getBodies
-