Interface MetricRuleOrBuilder (2.39.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
Name Description
key String
Returns
Type Description
boolean

getMetricCosts() (deprecated)

public abstract Map<String,Long> getMetricCosts()

Use #getMetricCostsMap() instead.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
key String
defaultValue long
Returns
Type Description
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
Name Description
key String
Returns
Type Description
long

getSelector()

public abstract String getSelector()

Selects the methods to which this rule applies.

Refer to selector for syntax details.

string selector = 1;

Returns
Type Description
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
Type Description
ByteString

The bytes for selector.