public class Metric extends MetricInfo
MetricInfo.filter()).
Metric adds a layer of service-related functionality over MetricInfo. Objects
of this class are immutable. To get a Metric object with the most recent information use
reload() or reloadAsync().
| Modifier and Type | Class and Description |
|---|---|
static class |
Metric.Builder
A builder for
Metric objects. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
delete()
Deletes this metric.
|
Future<Boolean> |
deleteAsync()
Sends a request for deleting this metric.
|
boolean |
equals(Object obj) |
int |
hashCode() |
Logging |
logging()
Returns the metrics's
Logging object used to issue requests. |
Metric |
reload()
Fetches current metric's latest information.
|
Future<Metric> |
reloadAsync()
Sends a request to fetch current metric's latest information.
|
Metric.Builder |
toBuilder()
Returns a builder for this
MetricInfo object. |
Metric |
update(MetricInfo metricInfo)
Updates current metric.
|
Future<Metric> |
updateAsync(MetricInfo metricInfo)
Sends a request to update current metric.
|
builder, description, filter, name, of, toStringpublic Metric.Builder toBuilder()
MetricInfoMetricInfo object.toBuilder in class MetricInfopublic final int hashCode()
hashCode in class MetricInfopublic final boolean equals(Object obj)
equals in class MetricInfopublic Logging logging()
Logging object used to issue requests.public boolean delete()
true if the metric was deleted, false if it was not foundLoggingException - upon failurepublic Future<Boolean> deleteAsync()
Future object to
consume the result. Future.get() returns true if the metric was deleted,
false if it was not found.LoggingException - upon failurepublic Metric reload()
null if the metric does not exist.Metric object with latest information or null if not foundLoggingException - upon failurepublic Future<Metric> reloadAsync()
Future object to consume the result. Future.get() returns a Metric
object with latest information or null if not found.LoggingException - upon failurepublic Metric update(MetricInfo metricInfo)
Metric object with updated informationLoggingException - upon failurepublic Future<Metric> updateAsync(MetricInfo metricInfo)
Future object to consume the result. Future.get() returns a
Metric object with updated information.LoggingException - upon failureCopyright © 2016 Google. All rights reserved.