public class LeastLoadBalancer
extends hudson.model.LoadBalancer
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.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
LeastLoadBalancer.ExecutorChunkComparator |
| Constructor and Description |
|---|
LeastLoadBalancer(hudson.model.LoadBalancer fallback)
Create the
LeastLoadBalancer with a fallback that will be
used in case of any failures. |
| Modifier and Type | Method and Description |
|---|---|
hudson.model.LoadBalancer |
getFallBackLoadBalancer()
Retrieves the fallback
LoadBalancer |
hudson.model.queue.MappingWorksheet.Mapping |
map(hudson.model.Queue.Task task,
hudson.model.queue.MappingWorksheet ws) |
public LeastLoadBalancer(hudson.model.LoadBalancer fallback)
LeastLoadBalancer with a fallback that will be
used in case of any failures.fallback - The LoadBalancer fallback to use in case of failurepublic hudson.model.queue.MappingWorksheet.Mapping map(hudson.model.Queue.Task task,
hudson.model.queue.MappingWorksheet ws)
map in class hudson.model.LoadBalancerpublic hudson.model.LoadBalancer getFallBackLoadBalancer()
LoadBalancerCopyright © 2016–2018. All rights reserved.