Class VSphereHostSelection.HostCandidate

java.lang.Object
org.jenkinsci.plugins.vsphere.tools.VSphereHostSelection.HostCandidate
Enclosing class:
VSphereHostSelection

public static final class VSphereHostSelection.HostCandidate extends Object
Describes one candidate host's name, availability and current load, as needed to decide whether/how favourably it can be used for a new clone.
  • Constructor Details

    • HostCandidate

      public HostCandidate(String name, boolean connected, boolean inMaintenanceMode, Integer cpuUsageMhz, int cpuCapacityMhz, Integer memUsageMB, long memCapacityMB)
  • Method Details

    • getName

      public String getName()
    • isConnected

      public boolean isConnected()
    • isInMaintenanceMode

      public boolean isInMaintenanceMode()
    • getCpuUsageMhz

      public Integer getCpuUsageMhz()
    • getCpuCapacityMhz

      public int getCpuCapacityMhz()
    • getMemUsageMB

      public Integer getMemUsageMB()
    • getMemCapacityMB

      public long getMemCapacityMB()
    • loadFraction

      public Double loadFraction()
      Fraction of capacity currently in use, taking the higher (more constrained) of CPU and memory. Returns null if usage stats are missing (stale/unavailable), so the host can be excluded rather than mis-ranked.
    • isUsable

      public boolean isUsable()
      True if the host is currently usable at all (connected and not in maintenance mode), regardless of load.