hudson.model.queue
Class MappingWorksheet.Mapping

java.lang.Object
  extended by 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 every MappingWorksheet.WorkChunk to MappingWorksheet.ExecutorChunk that satisfies the constraints.


Constructor Summary
MappingWorksheet.Mapping()
           
 
Method Summary
 MappingWorksheet.ExecutorChunk assign(int index, MappingWorksheet.ExecutorChunk element)
          Update the mapping to execute n-th MappingWorksheet.WorkChunk on the specified MappingWorksheet.ExecutorChunk.
 MappingWorksheet.ExecutorChunk assigned(int n)
          MappingWorksheet.ExecutorChunk assigned to the n-th work chunk.
 void execute(WorkUnitContext wuc)
          Executes this mapping by handing over Queue.Executables to Queue.JobOffer as defined by the mapping.
 MappingWorksheet.WorkChunk get(int n)
          n-th MappingWorksheet.WorkChunk.
 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 of WorkUnits that require assignments.
 Map<MappingWorksheet.WorkChunk,MappingWorksheet.ExecutorChunk> toMap()
          Returns the assignment as a map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappingWorksheet.Mapping

public MappingWorksheet.Mapping()
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)
n-th MappingWorksheet.WorkChunk.


assign

public MappingWorksheet.ExecutorChunk assign(int index,
                                             MappingWorksheet.ExecutorChunk element)
Update the mapping to execute n-th MappingWorksheet.WorkChunk on the specified MappingWorksheet.ExecutorChunk.


size

public int size()
Number of WorkUnits 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 over Queue.Executables to Queue.JobOffer as defined by the mapping.



Copyright © 2004-2013. All Rights Reserved.