public class BinPackingSolver extends Object
Constructor and Description |
---|
BinPackingSolver() |
Modifier and Type | Method and Description |
---|---|
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() |
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()
Copyright © GigaSpaces.