Class NodePreferenceScoringRule
java.lang.Object
hudson.model.AbstractDescribableImpl<ScoringRule>
jp.ikedam.jenkins.plugins.scoringloadbalancer.ScoringRule
jp.ikedam.jenkins.plugins.scoringloadbalancer.rules.NodePreferenceScoringRule
- All Implemented Interfaces:
ExtensionPoint
,Describable<ScoringRule>
Scores nodes depending on preferences of nodes and projects.
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorDescriptionNodePreferenceScoringRule
(int nodesPreferenceScale, int projectPreferenceScale) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
int
boolean
updateScores
(Queue.Task task, MappingWorksheet.WorkChunk wc, MappingWorksheet.Mapping m, ScoringLoadBalancer.NodesScore nodesScore) Scores nodes depending on preferences of nodes and projects.Methods inherited from class jp.ikedam.jenkins.plugins.scoringloadbalancer.ScoringRule
all
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
NodePreferenceScoringRule
@DataBoundConstructor public NodePreferenceScoringRule(int nodesPreferenceScale, int projectPreferenceScale) Constructor. Initialized with values a user configured.- Parameters:
nodesPreferenceScale
-projectPreferenceScale
-
-
-
Method Details
-
getNodesPreferenceScale
public int getNodesPreferenceScale()- Returns:
- the nodesPreferenceScale
-
getProjectPreferenceScale
public int getProjectPreferenceScale()- Returns:
- the projectPreferenceScale
-
updateScores
public boolean updateScores(Queue.Task task, MappingWorksheet.WorkChunk wc, MappingWorksheet.Mapping m, ScoringLoadBalancer.NodesScore nodesScore) Scores nodes depending on preferences of nodes and projects.- Specified by:
updateScores
in classScoringRule
- Parameters:
task
-wc
-m
-nodesScore
-- Returns:
- See Also:
-