Class LeastLoadBalancer
java.lang.Object
hudson.model.LoadBalancer
org.bstick12.jenkinsci.plugins.leastload.LeastLoadBalancer
- All Implemented Interfaces:
ExtensionPoint
A
LoadBalancer implementation that the leastload plugin uses to replace the default
Jenkins LoadBalancer
The LeastLoadBalancer chooses Executors that have the least load. An Executor is defined
as having the least load if it is idle or has the most available Executors
If for any reason we are unsuccessful in creating a MappingWorksheet.Mapping we fall back on the default Jenkins
LoadBalancer.CONSISTENT_HASH and try to use that.
- Author:
- brendan.nolan@gmail.com
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.LoadBalancer
CONSISTENT_HASH, DEFAULT -
Constructor Summary
ConstructorsConstructorDescriptionLeastLoadBalancer(LoadBalancer fallback) Create theLeastLoadBalancerwith a fallback that will be used in case of any failures. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the fallbackLoadBalancermap(Queue.Task task, MappingWorksheet ws) static voidregister()Methods inherited from class hudson.model.LoadBalancer
sanitize
-
Constructor Details
-
LeastLoadBalancer
Create theLeastLoadBalancerwith a fallback that will be used in case of any failures.- Parameters:
fallback- TheLoadBalancerfallback to use in case of failure
-
-
Method Details
-
register
-
map
- Specified by:
mapin classLoadBalancer
-
getFallBackLoadBalancer
Retrieves the fallbackLoadBalancer- Returns:
- - fallback
LoadBalancer
-