Class ResourceBudgetManager
- java.lang.Object
-
- org.apache.flink.runtime.clusterframework.types.ResourceBudgetManager
-
public class ResourceBudgetManager extends Object
Budget manager forResourceProfile
.For a given total resource budget, this class handles reserving and releasing resources from the budget, and rejects reservations if they cannot be satisfied by the remaining budget.
Both the total budget and the reservations are in the form of
ResourceProfile
.
-
-
Constructor Summary
Constructors Constructor Description ResourceBudgetManager(ResourceProfile totalBudget)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceProfile
getAvailableBudget()
ResourceProfile
getTotalBudget()
boolean
release(ResourceProfile reservation)
boolean
reserve(ResourceProfile reservation)
-
-
-
Constructor Detail
-
ResourceBudgetManager
public ResourceBudgetManager(ResourceProfile totalBudget)
-
-
Method Detail
-
getTotalBudget
public ResourceProfile getTotalBudget()
-
getAvailableBudget
public ResourceProfile getAvailableBudget()
-
reserve
public boolean reserve(ResourceProfile reservation)
-
release
public boolean release(ResourceProfile reservation)
-
-