org.openspaces.grid.gsm.capacity
Class CpuCapacityRequirement
java.lang.Object
org.openspaces.grid.gsm.capacity.CpuCapacityRequirement
- All Implemented Interfaces:
- Comparable<CapacityRequirement>, CapacityRequirement
public class CpuCapacityRequirement
- extends Object
- implements CapacityRequirement
CpuCapacityRequirement
public CpuCapacityRequirement()
CpuCapacityRequirement
public CpuCapacityRequirement(org.openspaces.core.internal.commons.math.fraction.Fraction cpu)
CpuCapacityRequirement
public CpuCapacityRequirement(double numberOfCpuCores)
convertCpuCoresFromDoubleToFraction
public static org.openspaces.core.internal.commons.math.fraction.Fraction convertCpuCoresFromDoubleToFraction(double cpu)
getCpu
public org.openspaces.core.internal.commons.math.fraction.Fraction getCpu()
compareTo
public int compareTo(CapacityRequirement o)
- Specified by:
compareTo
in interface Comparable<CapacityRequirement>
multiply
public CpuCapacityRequirement multiply(int i)
- Specified by:
multiply
in interface CapacityRequirement
subtract
public CpuCapacityRequirement subtract(CapacityRequirement o)
- Specified by:
subtract
in interface CapacityRequirement
subtractOrZero
public CpuCapacityRequirement subtractOrZero(CapacityRequirement o)
- Specified by:
subtractOrZero
in interface CapacityRequirement
equalsZero
public boolean equalsZero()
- Specified by:
equalsZero
in interface CapacityRequirement
add
public CpuCapacityRequirement add(CapacityRequirement o)
- Specified by:
add
in interface CapacityRequirement
toString
public String toString()
- Specified by:
toString
in interface CapacityRequirement
- Overrides:
toString
in class Object
equals
public boolean equals(Object otherRequirement)
- Specified by:
equals
in interface CapacityRequirement
- Overrides:
equals
in class Object
divide
public CapacityRequirement divide(int i)
- Specified by:
divide
in interface CapacityRequirement
min
public CapacityRequirement min(CapacityRequirement otherCapacityRequirement)
- Specified by:
min
in interface CapacityRequirement
max
public CapacityRequirement max(CapacityRequirement otherCapacityRequirement)
- Specified by:
max
in interface CapacityRequirement
divide
public double divide(CapacityRequirement otherCapacityRequirement)
- Specified by:
divide
in interface CapacityRequirement
getType
public CapacityRequirementType<CpuCapacityRequirement> getType()
- Specified by:
getType
in interface CapacityRequirement
Copyright © GigaSpaces.