Package hudson.model.queue
Class MappingWorksheet.Mapping
java.lang.Object
hudson.model.queue.MappingWorksheet.Mapping
- Enclosing class:
- MappingWorksheet
Represents the solution to the mapping problem.
It's a mapping from every
MappingWorksheet.WorkChunk to MappingWorksheet.ExecutorChunk
that satisfies the constraints.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassign(int index, MappingWorksheet.ExecutorChunk element) Update the mapping to execute n-thMappingWorksheet.WorkChunkon the specifiedMappingWorksheet.ExecutorChunk.assigned(int n) MappingWorksheet.ExecutorChunkassigned to the n-th work chunk.voidexecute(WorkUnitContext wuc) Executes this mapping by handing overQueue.Executables toQueue.JobOfferas defined by the mapping.get(int n) booleanMakes sure that all the assignments are made and it is within the constraints.booleanChecks if the assignments made thus far are valid an within the constraints.intsize()Number ofWorkUnits that require assignments.toMap()Returns the assignment as a map.
-
Constructor Details
-
Mapping
public Mapping()
-
-
Method Details
-
assigned
MappingWorksheet.ExecutorChunkassigned to the n-th work chunk. -
get
-
assign
Update the mapping to execute n-thMappingWorksheet.WorkChunkon the specifiedMappingWorksheet.ExecutorChunk. -
size
public int size()Number ofWorkUnits that require assignments. -
toMap
Returns the assignment as a map. -
isPartiallyValid
public boolean isPartiallyValid()Checks if the assignments made thus far are valid an within the constraints. -
isCompletelyValid
public boolean isCompletelyValid()Makes sure that all the assignments are made and it is within the constraints. -
execute
Executes this mapping by handing overQueue.Executables toQueue.JobOfferas defined by the mapping.
-