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 for
ScoringLoadBalancer
Manages views and holds configuration for ScoringLoadBalancer
.-
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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.Returns allScoringRule
s registered to Jenkins.Returns the name to display.Returns the list of enabled scoring rules.boolean
Returns whether ScoringLoadBalancer is enabledboolean
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
-
Constructor Details
-
DescriptorImpl
public DescriptorImpl()Constructor. Restore configurations.
-
-
Method Details
-
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
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:
-
configure
public boolean configure(boolean enabled, boolean reportScoresEnabled, List<ScoringRule> scoringRuleList) Used for testing purpose.- Parameters:
enabled
-reportScoresEnabled
-scoringRuleList
-- Returns:
-
configure
Used for testing purpose.- Parameters:
enabled
-reportScoresEnabled
-scoringRules
-- Returns:
-
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:
-
getAllScoringRuleList
Returns allScoringRule
s registered to Jenkins.- Returns:
- list of
Descriptor
ofScoringRule
s.
-