Class NodeLoadScoringRule
java.lang.Object
hudson.model.AbstractDescribableImpl<ScoringRule>
jp.ikedam.jenkins.plugins.scoringloadbalancer.ScoringRule
jp.ikedam.jenkins.plugins.scoringloadbalancer.rules.NodeLoadScoringRule
- All Implemented Interfaces:
ExtensionPoint,Describable<ScoringRule>
Score nodes depending on their loads.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
ConstructorsConstructorDescriptionNodeLoadScoringRule(int scale, int scoreForIdleExecutor, int scoreForBusyExecutor) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintgetScale()intintbooleanupdateScores(Queue.Task task, MappingWorksheet.WorkChunk wc, MappingWorksheet.Mapping m, ScoringLoadBalancer.NodesScore nodesScore) Score nodes depending on their loads.Methods inherited from class jp.ikedam.jenkins.plugins.scoringloadbalancer.ScoringRule
allMethods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
NodeLoadScoringRule
@DataBoundConstructor public NodeLoadScoringRule(int scale, int scoreForIdleExecutor, int scoreForBusyExecutor) Constructor. Initialized with values a user configured.- Parameters:
scale-scoreForIdleExecutor-scoreForBusyExecutor-
-
-
Method Details
-
getScale
public int getScale()- Returns:
- the scale
-
getScoreForIdleExecutor
public int getScoreForIdleExecutor()- Returns:
- the scoreForIdleExecutor
-
getScoreForBusyExecutor
public int getScoreForBusyExecutor()- Returns:
- the scoreForBusyExecutor
-
updateScores
public boolean updateScores(Queue.Task task, MappingWorksheet.WorkChunk wc, MappingWorksheet.Mapping m, ScoringLoadBalancer.NodesScore nodesScore) Score nodes depending on their loads.- Specified by:
updateScoresin classScoringRule- Parameters:
task-wc-m-nodesScore- a map from nodes to their scores- Returns:
- See Also:
-