public final class MetricValues
extends java.lang.Object
MetricValues.| Modifier and Type | Method and Description |
|---|---|
static com.google.api.servicecontrol.v1.MetricValue |
merge(com.google.api.MetricDescriptor.MetricKind kind,
com.google.api.servicecontrol.v1.MetricValue prior,
com.google.api.servicecontrol.v1.MetricValue latest)
Merge
prior with latest. |
static com.google.common.hash.Hasher |
putMetricValue(com.google.common.hash.Hasher h,
com.google.api.servicecontrol.v1.MetricValue value)
Updates
h with the contents of value. |
static com.google.common.hash.HashCode |
sign(com.google.api.servicecontrol.v1.MetricValue value)
Obtains the
HashCode for the contents of value. |
public static com.google.common.hash.Hasher putMetricValue(com.google.common.hash.Hasher h,
com.google.api.servicecontrol.v1.MetricValue value)
h with the contents of value.h - a Hashervalue - a MetricValue to be added to the hashHasher, to allow fluent-style usagepublic static com.google.common.hash.HashCode sign(com.google.api.servicecontrol.v1.MetricValue value)
HashCode for the contents of value.value - a MetricValue to be signedHashCode corresponding to valuepublic static com.google.api.servicecontrol.v1.MetricValue merge(com.google.api.MetricDescriptor.MetricKind kind,
com.google.api.servicecontrol.v1.MetricValue prior,
com.google.api.servicecontrol.v1.MetricValue latest)
prior with latest.
If kind is MetricKind.DELTA then the result contains a combination of values in
prior and latest. For all other kinds, it's sufficient to return the metric with the latest end
time.kind - the MetricKindprior - a MetricValue instancelatest - a MetricValue, expected to be a later version of priorMetricValue that combines prior and latest depending on kindjava.lang.IllegalArgumentException - if the prior and latest are have different
types of value, or if the type is not mergeable