Class PlacementConstraint.TimedPlacementConstraint
java.lang.Object
org.apache.hadoop.yarn.api.resource.PlacementConstraint.TimedPlacementConstraint
- All Implemented Interfaces:
PlacementConstraint.Visitable
- Enclosing class:
- PlacementConstraint
public static class PlacementConstraint.TimedPlacementConstraint
extends Object
implements PlacementConstraint.Visitable
Represents a timed placement constraint that has to be satisfied within a
time window.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe unit of scheduling delay. -
Constructor Summary
ConstructorsConstructorDescriptionTimedPlacementConstraint(PlacementConstraint.AbstractConstraint constraint, long schedulingDelay) TimedPlacementConstraint(PlacementConstraint.AbstractConstraint constraint, long schedulingDelay, PlacementConstraint.TimedPlacementConstraint.DelayUnit delayUnit) -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(PlacementConstraint.Visitor<T> visitor) Visitor pattern.booleanGet the constraint that has to be satisfied within the time window.The unit of the scheduling delay.longGet the scheduling delay value that determines the time window within which the constraint has to be satisfied.inthashCode()voidsetConstraint(PlacementConstraint.AbstractConstraint constraint) Sets the constraint that has to be satisfied within the time window.
-
Constructor Details
-
TimedPlacementConstraint
public TimedPlacementConstraint(PlacementConstraint.AbstractConstraint constraint, long schedulingDelay, PlacementConstraint.TimedPlacementConstraint.DelayUnit delayUnit) -
TimedPlacementConstraint
public TimedPlacementConstraint(PlacementConstraint.AbstractConstraint constraint, long schedulingDelay) -
TimedPlacementConstraint
-
-
Method Details
-
getConstraint
Get the constraint that has to be satisfied within the time window.- Returns:
- the constraint to be satisfied
-
setConstraint
Sets the constraint that has to be satisfied within the time window.- Parameters:
constraint- the constraint to be satisfied
-
getSchedulingDelay
public long getSchedulingDelay()Get the scheduling delay value that determines the time window within which the constraint has to be satisfied.- Returns:
- the value of the scheduling delay
-
getDelayUnit
The unit of the scheduling delay.- Returns:
- the unit of the delay
-
accept
Description copied from interface:PlacementConstraint.VisitableVisitor pattern.- Specified by:
acceptin interfacePlacementConstraint.Visitable- Type Parameters:
T- defines the type that the visitor will use and the return type of the accept.- Parameters:
visitor- visitor to be used- Returns:
- the result of visiting a given object.
-
equals
-
hashCode
public int hashCode()
-