Package hudson.model.queue
Class MappingWorksheet.Mapping
- java.lang.Object
-
- hudson.model.queue.MappingWorksheet.Mapping
-
- Enclosing class:
- MappingWorksheet
public final class MappingWorksheet.Mapping extends Object
Represents the solution to the mapping problem. It's a mapping from everyMappingWorksheet.WorkChunk
toMappingWorksheet.ExecutorChunk
that satisfies the constraints.
-
-
Constructor Summary
Constructors Constructor Description Mapping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MappingWorksheet.ExecutorChunk
assign(int index, MappingWorksheet.ExecutorChunk element)
Update the mapping to execute n-thMappingWorksheet.WorkChunk
on the specifiedMappingWorksheet.ExecutorChunk
.MappingWorksheet.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.MappingWorksheet.WorkChunk
get(int n)
boolean
isCompletelyValid()
Makes sure that all the assignments are made and it is within the constraints.boolean
isPartiallyValid()
Checks if the assignments made thus far are valid an within the constraints.int
size()
Number ofWorkUnit
s that require assignments.Map<MappingWorksheet.WorkChunk,MappingWorksheet.ExecutorChunk>
toMap()
Returns the assignment as a map.
-
-
-
Method Detail
-
assigned
public MappingWorksheet.ExecutorChunk assigned(int n)
MappingWorksheet.ExecutorChunk
assigned to the n-th work chunk.
-
get
public MappingWorksheet.WorkChunk get(int n)
-
assign
public MappingWorksheet.ExecutorChunk assign(int index, MappingWorksheet.ExecutorChunk element)
Update the mapping to execute n-thMappingWorksheet.WorkChunk
on the specifiedMappingWorksheet.ExecutorChunk
.
-
size
public int size()
Number ofWorkUnit
s that require assignments.
-
toMap
public Map<MappingWorksheet.WorkChunk,MappingWorksheet.ExecutorChunk> 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
public void execute(WorkUnitContext wuc)
Executes this mapping by handing overQueue.Executable
s toQueue.JobOffer
as defined by the mapping.
-
-