Class ResourceAllocation
java.lang.Object
com.yahoo.vespa.hosted.controller.api.integration.resource.ResourceAllocation
An allocation of node resources.
- Author:
- ldalves
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionResourceAllocation(double cpuCores, double memoryGb, double diskGb, com.yahoo.config.provision.NodeResources.Architecture architecture) -
Method Summary
Modifier and TypeMethodDescriptionbooleancom.yahoo.config.provision.NodeResources.ArchitecturedoubledoubledoubleinthashCode()multiply(double multiplicand) Returns a copy of this with each resource multiplied by given factorplus(ResourceAllocation allocation) Returns a copy of this with the given allocation addeddoubleusageFraction(ResourceAllocation total)
-
Field Details
-
ZERO
-
-
Constructor Details
-
ResourceAllocation
public ResourceAllocation(double cpuCores, double memoryGb, double diskGb, com.yahoo.config.provision.NodeResources.Architecture architecture)
-
-
Method Details
-
usageFraction
-
getCpuCores
public double getCpuCores() -
getMemoryGb
public double getMemoryGb() -
getDiskGb
public double getDiskGb() -
getArchitecture
public com.yahoo.config.provision.NodeResources.Architecture getArchitecture() -
plus
Returns a copy of this with the given allocation added -
multiply
Returns a copy of this with each resource multiplied by given factor -
equals
-
hashCode
public int hashCode()
-