Class ScoringLoadBalancer.DescriptorImpl
- java.lang.Object
-
- hudson.model.Descriptor<ScoringLoadBalancer>
-
- jp.ikedam.jenkins.plugins.scoringloadbalancer.ScoringLoadBalancer.DescriptorImpl
-
- Enclosing class:
- ScoringLoadBalancer
@Extension public static class ScoringLoadBalancer.DescriptorImpl extends Descriptor<ScoringLoadBalancer>
Descriptor forScoringLoadBalancer
Manages views and holds configuration forScoringLoadBalancer
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
-
Field Summary
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description DescriptorImpl()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
configure(boolean enabled, boolean reportScoresEnabled, List<ScoringRule> scoringRuleList)
Used for testing purpose.boolean
configure(boolean enabled, boolean reportScoresEnabled, ScoringRule... scoringRules)
Used for testing purpose.boolean
configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json)
Update and store configuration.DescriptorExtensionList<ScoringRule,Descriptor<ScoringRule>>
getAllScoringRuleList()
Returns allScoringRule
s registered to Jenkins.String
getDisplayName()
Returns the name to display.List<ScoringRule>
getScoringRuleList()
Returns the list of enabled scoring rules.boolean
isEnabled()
Returns whether ScoringLoadBalancer is enabledboolean
isReportScoresEnabled()
Returns whether to log scores of nodes in each load balancing calculation.-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
Returns whether ScoringLoadBalancer is enabled- Returns:
- whether ScoringLoadBalancer is enabled
-
isReportScoresEnabled
public boolean isReportScoresEnabled()
Returns whether to log scores of nodes in each load balancing calculation. Enabling this makes many outputs, and not good for production environments.- Returns:
- whether to log scores of nodes
-
getScoringRuleList
public List<ScoringRule> getScoringRuleList()
Returns the list of enabled scoring rules.- Returns:
- the enabled scoring rules.
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) throws Descriptor.FormException
Update and store configuration.- Overrides:
configure
in classDescriptor<ScoringLoadBalancer>
- Parameters:
req
-json
-- Returns:
- Throws:
Descriptor.FormException
- See Also:
Descriptor.configure(org.kohsuke.stapler.StaplerRequest, net.sf.json.JSONObject)
-
configure
public boolean configure(boolean enabled, boolean reportScoresEnabled, List<ScoringRule> scoringRuleList)
Used for testing purpose.- Parameters:
enabled
-reportScoresEnabled
-scoringRuleList
-- Returns:
-
configure
public boolean configure(boolean enabled, boolean reportScoresEnabled, ScoringRule... scoringRules)
Used for testing purpose.- Parameters:
enabled
-reportScoresEnabled
-scoringRules
-- Returns:
-
getDisplayName
public String getDisplayName()
Returns the name to display. Displayed in System Configuration page as a section title.- Overrides:
getDisplayName
in classDescriptor<ScoringLoadBalancer>
- Returns:
- the name to display
- See Also:
Descriptor.getDisplayName()
-
getAllScoringRuleList
public DescriptorExtensionList<ScoringRule,Descriptor<ScoringRule>> getAllScoringRuleList()
Returns allScoringRule
s registered to Jenkins.- Returns:
- list of
Descriptor
ofScoringRule
s.
-
-