Interface MetricRuleOrBuilder (2.37.1)

public interface MetricRuleOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

containsMetricCosts(String key)

public abstract boolean containsMetricCosts(String key)

Metrics to update when the selected methods are called, and the associated cost applied to each metric.

The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.

map<string, int64> metric_costs = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getMetricCosts() (deprecated)

public abstract Map<String,Long> getMetricCosts()

Use #getMetricCostsMap() instead.

Returns
TypeDescription
Map<String,Long>

getMetricCostsCount()

public abstract int getMetricCostsCount()

Metrics to update when the selected methods are called, and the associated cost applied to each metric.

The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.

map<string, int64> metric_costs = 2;

Returns
TypeDescription
int

getMetricCostsMap()

public abstract Map<String,Long> getMetricCostsMap()

Metrics to update when the selected methods are called, and the associated cost applied to each metric.

The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.

map<string, int64> metric_costs = 2;

Returns
TypeDescription
Map<String,Long>

getMetricCostsOrDefault(String key, long defaultValue)

public abstract long getMetricCostsOrDefault(String key, long defaultValue)

Metrics to update when the selected methods are called, and the associated cost applied to each metric.

The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.

map<string, int64> metric_costs = 2;

Parameters
NameDescription
keyString
defaultValuelong
Returns
TypeDescription
long

getMetricCostsOrThrow(String key)

public abstract long getMetricCostsOrThrow(String key)

Metrics to update when the selected methods are called, and the associated cost applied to each metric.

The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.

map<string, int64> metric_costs = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
long

getSelector()

public abstract String getSelector()

Selects the methods to which this rule applies.

Refer to selector for syntax details.

string selector = 1;

Returns
TypeDescription
String

The selector.

getSelectorBytes()

public abstract ByteString getSelectorBytes()

Selects the methods to which this rule applies.

Refer to selector for syntax details.

string selector = 1;

Returns
TypeDescription
ByteString

The bytes for selector.