java.lang.Object
com.yahoo.vespa.hosted.controller.api.integration.resource.ResourceAllocation

public class ResourceAllocation extends Object
An allocation of node resources.
Author:
ldalves
  • Field Details

  • Constructor Details

    • ResourceAllocation

      public ResourceAllocation(double cpuCores, double memoryGb, double diskGb, com.yahoo.config.provision.NodeResources.Architecture architecture)
  • Method Details

    • usageFraction

      public double usageFraction(ResourceAllocation total)
    • getCpuCores

      public double getCpuCores()
    • getMemoryGb

      public double getMemoryGb()
    • getDiskGb

      public double getDiskGb()
    • getArchitecture

      public com.yahoo.config.provision.NodeResources.Architecture getArchitecture()
    • plus

      public ResourceAllocation plus(ResourceAllocation allocation)
      Returns a copy of this with the given allocation added
    • multiply

      public ResourceAllocation multiply(double multiplicand)
      Returns a copy of this with each resource multiplied by given factor
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object