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.WorkChunktoMappingWorksheet.ExecutorChunkthat satisfies the constraints.
-
-
Constructor Summary
Constructors Constructor Description Mapping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MappingWorksheet.ExecutorChunkassign(int index, MappingWorksheet.ExecutorChunk element)Update the mapping to execute n-thMappingWorksheet.WorkChunkon the specifiedMappingWorksheet.ExecutorChunk.MappingWorksheet.ExecutorChunkassigned(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.MappingWorksheet.WorkChunkget(int n)booleanisCompletelyValid()Makes sure that all the assignments are made and it is within the constraints.booleanisPartiallyValid()Checks if the assignments made thus far are valid an within the constraints.intsize()Number ofWorkUnits 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.ExecutorChunkassigned 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.WorkChunkon the specifiedMappingWorksheet.ExecutorChunk.
-
size
public int size()
Number ofWorkUnits 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.Executables toQueue.JobOfferas defined by the mapping.
-
-