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
-
Method Summary
Modifier and TypeMethodDescriptionassign
(int index, MappingWorksheet.ExecutorChunk element) Update the mapping to execute n-thMappingWorksheet.WorkChunk
on the specifiedMappingWorksheet.ExecutorChunk
.assigned
(int n) MappingWorksheet.ExecutorChunk
assigned to the n-th work chunk.void
execute
(WorkUnitContext wuc) Executes this mapping by handing overQueue.Executable
s toQueue.JobOffer
as defined by the mapping.get
(int n) boolean
Makes sure that all the assignments are made and it is within the constraints.boolean
Checks if the assignments made thus far are valid an within the constraints.int
size()
Number ofWorkUnit
s that require assignments.toMap()
Returns the assignment as a map.
-
Constructor Details
-
Mapping
public Mapping()
-
-
Method Details
-
assigned
MappingWorksheet.ExecutorChunk
assigned to the n-th work chunk. -
get
-
assign
Update the mapping to execute n-thMappingWorksheet.WorkChunk
on the specifiedMappingWorksheet.ExecutorChunk
. -
size
public int size()Number ofWorkUnit
s 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.Executable
s toQueue.JobOffer
as defined by the mapping.
-