org.openspaces.grid.gsm.capacity
Class CapacityRequirements
java.lang.Object
org.openspaces.grid.gsm.capacity.CapacityRequirements
- Direct Known Subclasses:
- MachineCapacityRequirements
public class CapacityRequirements
- extends Object
CapacityRequirements
public CapacityRequirements(CapacityRequirement... requirements)
getRequirements
public CapacityRequirement[] getRequirements()
getRequirement
public <T extends CapacityRequirement> T getRequirement(CapacityRequirementType<T> type)
multiply
public CapacityRequirements multiply(int i)
divide
public CapacityRequirements divide(int i)
subtract
public CapacityRequirements subtract(CapacityRequirements otherRequirements)
subtract
public CapacityRequirements subtract(CapacityRequirement otherRequirement)
subtractOrZero
public CapacityRequirements subtractOrZero(CapacityRequirement otherRequirement)
subtractOrZero
public CapacityRequirements subtractOrZero(CapacityRequirements otherRequirements)
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object otherRequirements)
- Overrides:
equals
in class Object
equalsZero
public boolean equalsZero()
add
public CapacityRequirements add(CapacityRequirements otherRequirements)
min
public CapacityRequirements min(CapacityRequirements otherRequirements)
max
public CapacityRequirements max(CapacityRequirements otherCapacityRequirements)
max
public CapacityRequirements max(CapacityRequirement capacityRequirement)
set
public CapacityRequirements set(CapacityRequirement capacityRequirement)
divideExactly
public int divideExactly(CapacityRequirements otherCapacityRequirements)
- Divides this by the specified object.
- Returns:
- the exact integer that is the result of the division, or -1 if such integer for all requirements does not exist
greaterOrEquals
public boolean greaterOrEquals(CapacityRequirements otherRequirements)
greaterThan
public boolean greaterThan(CapacityRequirements otherRequirements)
toString
public String toString()
- Overrides:
toString
in class Object
add
public CapacityRequirements add(CapacityRequirement capacityToAllocateOnMachine)
Copyright © GigaSpaces.