Class Quota
- java.lang.Object
-
- com.yahoo.vespa.hosted.controller.api.integration.billing.Quota
-
public class Quota extends Object
Quota information transmitted to the configserver on deploy. All limits are represented with an Optional type where the empty optional means unlimited resource use.- Author:
- andreer, ogronnesby
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<BigDecimal>budget()Maximum $/hour run-rate for the Vespa deploymentbooleanequals(Object o)inthashCode()booleanisUnlimited()OptionalIntmaxClusterSize()Maximum number of nodes in a cluster in a Vespa deploymentQuotasubtractUsage(double rate)StringtoString()static Quotaunlimited()Construct a Quota that allows unlimited resource usageQuotawithBudget(int budget)QuotawithBudget(BigDecimal budget)QuotawithMaxClusterSize(int clusterSize)QuotawithoutBudget()static Quotazero()Construct a Quota that allows zero resource usage
-
-
-
Method Detail
-
withMaxClusterSize
public Quota withMaxClusterSize(int clusterSize)
-
zero
public static Quota zero()
Construct a Quota that allows zero resource usage
-
unlimited
public static Quota unlimited()
Construct a Quota that allows unlimited resource usage
-
isUnlimited
public boolean isUnlimited()
-
withBudget
public Quota withBudget(BigDecimal budget)
-
withBudget
public Quota withBudget(int budget)
-
withoutBudget
public Quota withoutBudget()
-
maxClusterSize
public OptionalInt maxClusterSize()
Maximum number of nodes in a cluster in a Vespa deployment
-
budget
public Optional<BigDecimal> budget()
Maximum $/hour run-rate for the Vespa deployment
-
subtractUsage
public Quota subtractUsage(double rate)
-
-