public class DefaultFitnessCalculator extends java.lang.Object implements VMTaskFitnessCalculator
Constructor and Description |
---|
DefaultFitnessCalculator() |
Modifier and Type | Method and Description |
---|---|
double |
calculateFitness(TaskRequest taskRequest,
VirtualMachineCurrentState targetVM,
TaskTrackerState taskTrackerState)
Computes the suitability of
targetVM to take on the task described by taskRequest to be
1.0 (fully suitable). |
java.lang.String |
getName()
Returns the name of this fitness calculator (the class name).
|
public java.lang.String getName()
getName
in interface VMTaskFitnessCalculator
public double calculateFitness(TaskRequest taskRequest, VirtualMachineCurrentState targetVM, TaskTrackerState taskTrackerState)
targetVM
to take on the task described by taskRequest
to be
1.0 (fully suitable).calculateFitness
in interface VMTaskFitnessCalculator
taskRequest
- a description of the task to be assignedtargetVM
- a description of the host to which the task may potentially be assignedtaskTrackerState
- the state of tasks and task assignments in the system at large