public abstract class AbstractQueueCapacityCalculator extends Object
Constructor and Description |
---|
AbstractQueueCapacityCalculator() |
Modifier and Type | Method and Description |
---|---|
abstract double |
calculateMaximumResource(ResourceCalculationDriver resourceCalculationDriver,
CalculationContext context,
String label)
Calculates the maximum effective resource.
|
abstract double |
calculateMinimumResource(ResourceCalculationDriver resourceCalculationDriver,
CalculationContext context,
String label)
Calculates the minimum effective resource.
|
abstract void |
calculateResourcePrerequisites(ResourceCalculationDriver resourceCalculationDriver)
Executes all logic that must be called prior to the effective resource value calculations.
|
abstract QueueCapacityVector.ResourceUnitCapacityType |
getCapacityType()
Returns the capacity type the calculator could handle.
|
protected Set<String> |
getResourceNames(CSQueue queue,
String label)
Returns all resource names that are defined for the capacity type that is
handled by the calculator.
|
protected Set<String> |
getResourceNames(CSQueue queue,
String label,
QueueCapacityVector.ResourceUnitCapacityType capacityType)
Returns all resource names that are defined for a capacity type.
|
abstract void |
updateCapacitiesAfterCalculation(ResourceCalculationDriver resourceCalculationDriver,
CSQueue queue,
String label)
Sets the metrics and statistics after effective resource values calculation.
|
public abstract void updateCapacitiesAfterCalculation(ResourceCalculationDriver resourceCalculationDriver, CSQueue queue, String label)
queue
- the queue on which the calculations are basedresourceCalculationDriver
- driver that contains the intermediate calculation results for
a queue branchlabel
- node labelpublic abstract QueueCapacityVector.ResourceUnitCapacityType getCapacityType()
public abstract double calculateMinimumResource(ResourceCalculationDriver resourceCalculationDriver, CalculationContext context, String label)
resourceCalculationDriver
- driver that contains the intermediate calculation results for
a queue branchcontext
- the units evaluated in the current iteration phaselabel
- node labelpublic abstract double calculateMaximumResource(ResourceCalculationDriver resourceCalculationDriver, CalculationContext context, String label)
resourceCalculationDriver
- driver that contains the intermediate calculation results for
a queue branchcontext
- the units evaluated in the current iteration phaselabel
- node labelpublic abstract void calculateResourcePrerequisites(ResourceCalculationDriver resourceCalculationDriver)
resourceCalculationDriver
- driver that contains the parent queue on which the
prerequisite calculation should be madeprotected Set<String> getResourceNames(CSQueue queue, String label)
queue
- queue for which the capacity vector is definedlabel
- node labelprotected Set<String> getResourceNames(CSQueue queue, String label, QueueCapacityVector.ResourceUnitCapacityType capacityType)
queue
- queue for which the capacity vector is definedlabel
- node labelcapacityType
- capacity type for which the resource names are definedCopyright © 2008–2024 Apache Software Foundation. All rights reserved.