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 classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorDescriptionNodeLoadScoringRule
(int scale, int scoreForIdleExecutor, int scoreForBusyExecutor) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
getScale()
int
int
boolean
updateScores
(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
all
Methods 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:
updateScores
in classScoringRule
- Parameters:
task
-wc
-m
-nodesScore
- a map from nodes to their scores- Returns:
- See Also:
-