|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openspaces.grid.gsm.machines.BinPackingSolver
public class BinPackingSolver
A greedy 2D bin packing algorithm.
Constructor Summary | |
---|---|
BinPackingSolver()
|
Method Summary | |
---|---|
CapacityRequirementsPerAgent |
getAllocatedCapacityForPu()
|
CapacityRequirementsPerAgent |
getAllocatedCapacityResult()
|
CapacityRequirementsPerAgent |
getDeallocatedCapacityResult()
|
CapacityRequirementsPerAgent |
getUnallocatedCapacity()
|
boolean |
isAllowMoreThanAverageMemoryPerMachine()
|
void |
reset()
cleans AllocatedResult and DeallocatedResult Used for unit testing |
void |
setAgentAllocationPriority(Map<String,Long> agentPriority)
The higher the priority the less likely for the machine to be scaled in |
void |
setAllocatedCapacityForPu(CapacityRequirementsPerAgent allocatedCapacityForPu)
Sets the currently allocated capacity of PU |
void |
setAllowMoreThanAverageMemoryPerMachine(boolean allowMoreThanAverageMemoryPerMachine)
|
void |
setContainerMemoryCapacityInMB(long containerMemoryCapacityInMB)
Sets the smallest unit of memory allocation. |
void |
setLogger(Log logger)
Sets the processing unit specific logger |
void |
setMaxAllocatedMemoryCapacityOfPuInMB(long maxMemoryInMB)
Sets the maximum total memory that can be allocated for PU |
void |
setMaxAllocatedMemoryCapacityOfPuPerMachineInMB(long maxMemoryCapacityPerMachineInMB)
Sets the maximum total memory that can be allocated for PU on a single machine |
void |
setMinimumNumberOfMachines(int minimumNumberOfMachines)
Used for high availability purposes to calculate maximum cpu and memory per machine. |
void |
setUnallocatedCapacity(CapacityRequirementsPerAgent unallocatedCapacity)
Sets the remaining unallocated capacity on existing agents. |
void |
solveManualCapacityScaleIn(CapacityRequirements capacityToDeallocate)
|
void |
solveManualCapacityScaleOut(CapacityRequirements capacityToAllocate)
|
void |
solveNumberOfMachines(int numberOfMachines)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BinPackingSolver()
Method Detail |
---|
public boolean isAllowMoreThanAverageMemoryPerMachine()
public void setAllowMoreThanAverageMemoryPerMachine(boolean allowMoreThanAverageMemoryPerMachine)
public void setMinimumNumberOfMachines(int minimumNumberOfMachines)
minimumNumberOfMachines
- public void setLogger(Log logger)
public void setContainerMemoryCapacityInMB(long containerMemoryCapacityInMB)
public void setUnallocatedCapacity(CapacityRequirementsPerAgent unallocatedCapacity)
public void setAgentAllocationPriority(Map<String,Long> agentPriority)
agentPriority
- - a map between agent UID and its prioritypublic void setAllocatedCapacityForPu(CapacityRequirementsPerAgent allocatedCapacityForPu)
public void setMaxAllocatedMemoryCapacityOfPuInMB(long maxMemoryInMB)
public void setMaxAllocatedMemoryCapacityOfPuPerMachineInMB(long maxMemoryCapacityPerMachineInMB)
public void solveManualCapacityScaleIn(CapacityRequirements capacityToDeallocate)
public void solveManualCapacityScaleOut(CapacityRequirements capacityToAllocate)
public void solveNumberOfMachines(int numberOfMachines)
public CapacityRequirementsPerAgent getAllocatedCapacityResult()
public CapacityRequirementsPerAgent getDeallocatedCapacityResult()
public CapacityRequirementsPerAgent getAllocatedCapacityForPu()
public CapacityRequirementsPerAgent getUnallocatedCapacity()
public void reset()
public String toString()
toString
in class Object
|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |