public interface MetricsService
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_TENANT_ID |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<Void> |
addAvailabilityData(List<AvailabilityMetric> metrics) |
com.google.common.util.concurrent.ListenableFuture<Void> |
addNumericData(List<NumericMetric> metrics) |
com.google.common.util.concurrent.ListenableFuture<Void> |
createMetric(Metric metric) |
com.google.common.util.concurrent.ListenableFuture<Void> |
createTenant(Tenant tenant)
This method should be call before ever inserting any data to ensure that the tenant id is unique and to establish
any global configuration for data retention and for pre-computed aggregates.
|
com.google.common.util.concurrent.ListenableFuture<Map<MetricId,Set<Availability>>> |
findAvailabilityByTags(String tenantId,
Set<String> tags) |
com.google.common.util.concurrent.ListenableFuture<AvailabilityMetric> |
findAvailabilityData(AvailabilityMetric metric,
long start,
long end) |
com.google.common.util.concurrent.ListenableFuture<List<Counter>> |
findCounters(String group) |
com.google.common.util.concurrent.ListenableFuture<List<Counter>> |
findCounters(String group,
List<String> counterNames) |
com.google.common.util.concurrent.ListenableFuture<List<NumericData>> |
findData(NumericMetric metric,
long start,
long end)
Find and return raw metrics for {id} that have a timestamp between {start} and {end}
|
com.google.common.util.concurrent.ListenableFuture<Metric> |
findMetric(String tenantId,
MetricType type,
MetricId id) |
com.google.common.util.concurrent.ListenableFuture<List<Metric>> |
findMetrics(String tenantId,
MetricType type) |
com.google.common.util.concurrent.ListenableFuture<NumericMetric> |
findNumericData(NumericMetric metric,
long start,
long end) |
com.google.common.util.concurrent.ListenableFuture<Map<MetricId,Set<NumericData>>> |
findNumericDataByTags(String tenantId,
Set<String> tags) |
com.google.common.util.concurrent.ListenableFuture<List<Tenant>> |
getTenants() |
com.google.common.util.concurrent.ListenableFuture<Boolean> |
idExists(String id)
Check if a metric with the passed {id} has been stored in the system
|
void |
shutdown() |
void |
startUp(Map<String,String> params)
called to start the service up if needed
|
void |
startUp(com.datastax.driver.core.Session session)
Startup with a given cassandra session
|
com.google.common.util.concurrent.ListenableFuture<List<Availability>> |
tagAvailabilityData(AvailabilityMetric metric,
Set<String> tags,
long timestamp) |
com.google.common.util.concurrent.ListenableFuture<List<Availability>> |
tagAvailabilityData(AvailabilityMetric metric,
Set<String> tags,
long start,
long end) |
com.google.common.util.concurrent.ListenableFuture<List<NumericData>> |
tagNumericData(NumericMetric metric,
Set<String> tags,
long timestamp) |
com.google.common.util.concurrent.ListenableFuture<List<NumericData>> |
tagNumericData(NumericMetric metric,
Set<String> tags,
long start,
long end) |
com.google.common.util.concurrent.ListenableFuture<Void> |
updateCounter(Counter counter) |
com.google.common.util.concurrent.ListenableFuture<Void> |
updateCounters(Collection<Counter> counters) |
com.google.common.util.concurrent.ListenableFuture<Void> |
updateMetadata(Metric metric,
Map<String,String> metadata,
Set<String> deletions) |
static final String DEFAULT_TENANT_ID
void startUp(Map<String,String> params)
params - from e.g. servlet contextvoid startUp(com.datastax.driver.core.Session session)
session - void shutdown()
com.google.common.util.concurrent.ListenableFuture<Void> createTenant(Tenant tenant)
This method should be call before ever inserting any data to ensure that the tenant id is unique and to establish any global configuration for data retention and for pre-computed aggregates. An exception is thrown if a tenant with the same id already exists.
All data ia associated with a tenant via the tenant id; however, the foreign
key like relationship is not enforced. Data can be inserted with a non-existent tenant id. More importantly,
data could be inserted with a tenant id that already exists.
tenant - The tenant to createTenantAlreadyExistsExceptioncom.google.common.util.concurrent.ListenableFuture<Metric> findMetric(String tenantId, MetricType type, MetricId id)
com.google.common.util.concurrent.ListenableFuture<List<Metric>> findMetrics(String tenantId, MetricType type)
com.google.common.util.concurrent.ListenableFuture<Void> updateMetadata(Metric metric, Map<String,String> metadata, Set<String> deletions)
com.google.common.util.concurrent.ListenableFuture<Void> addNumericData(List<NumericMetric> metrics)
com.google.common.util.concurrent.ListenableFuture<NumericMetric> findNumericData(NumericMetric metric, long start, long end)
com.google.common.util.concurrent.ListenableFuture<List<NumericData>> findData(NumericMetric metric, long start, long end)
com.google.common.util.concurrent.ListenableFuture<Void> addAvailabilityData(List<AvailabilityMetric> metrics)
com.google.common.util.concurrent.ListenableFuture<AvailabilityMetric> findAvailabilityData(AvailabilityMetric metric, long start, long end)
com.google.common.util.concurrent.ListenableFuture<Void> updateCounter(Counter counter)
com.google.common.util.concurrent.ListenableFuture<Void> updateCounters(Collection<Counter> counters)
com.google.common.util.concurrent.ListenableFuture<List<Counter>> findCounters(String group)
com.google.common.util.concurrent.ListenableFuture<List<Counter>> findCounters(String group, List<String> counterNames)
com.google.common.util.concurrent.ListenableFuture<Boolean> idExists(String id)
com.google.common.util.concurrent.ListenableFuture<List<NumericData>> tagNumericData(NumericMetric metric, Set<String> tags, long start, long end)
com.google.common.util.concurrent.ListenableFuture<List<Availability>> tagAvailabilityData(AvailabilityMetric metric, Set<String> tags, long start, long end)
com.google.common.util.concurrent.ListenableFuture<List<NumericData>> tagNumericData(NumericMetric metric, Set<String> tags, long timestamp)
com.google.common.util.concurrent.ListenableFuture<List<Availability>> tagAvailabilityData(AvailabilityMetric metric, Set<String> tags, long timestamp)
com.google.common.util.concurrent.ListenableFuture<Map<MetricId,Set<NumericData>>> findNumericDataByTags(String tenantId, Set<String> tags)
Copyright © 2015 Red Hat, Inc.. All rights reserved.