public final class ExclusiveHostConstraint extends java.lang.Object implements ConstraintEvaluator
The task scheduler gives this constraint special treatment: While usually the scheduler only evaluates the
constraints of a new task, if an already-assigned task has an ExclusiveHostRestraint
then the host on
which the task has been assigned fails this exclusive host constraint check as well.
ConstraintEvaluator.Result
Constructor and Description |
---|
ExclusiveHostConstraint() |
Modifier and Type | Method and Description |
---|---|
ConstraintEvaluator.Result |
evaluate(TaskRequest taskRequest,
VirtualMachineCurrentState targetVM,
TaskTrackerState taskTrackerState)
Determines whether the prospective host already has tasks either running on it or assigned to be run on
it, and returns a false Result if either of those things is the case.
|
java.lang.String |
getName()
Returns the name of this class as a String.
|
public java.lang.String getName()
getName
in interface ConstraintEvaluator
public ConstraintEvaluator.Result evaluate(TaskRequest taskRequest, VirtualMachineCurrentState targetVM, TaskTrackerState taskTrackerState)
evaluate
in interface ConstraintEvaluator
taskRequest
- describes the task to be considered for assignment to the hosttargetVM
- describes the host to be considered for accepting the tasktaskTrackerState
- describes the state of tasks assigned to or running on hosts throughout the
system