public class MeasurementUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
UNIT_COLLECTION_POINTS |
static int |
UNIT_DAYS |
static int |
UNIT_HOURS |
static int |
UNIT_MINUTES |
static int |
UNIT_WEEKS |
| Constructor and Description |
|---|
MeasurementUtils() |
| Modifier and Type | Method and Description |
|---|---|
static List<Long> |
calculateTimeFrame(int lastN,
int unit)
Method calculateTimeFrame
Returns a two element
List of Long objects representing the begin and end times (in
milliseconds since the epoch) of the timeframe. |
static org.rhq.core.domain.measurement.ui.MetricDisplaySummary |
parseMetricToken(String token)
Parse the passed token that identifies single metric or group.
|
public static final int UNIT_COLLECTION_POINTS
public static final int UNIT_MINUTES
public static final int UNIT_HOURS
public static final int UNIT_DAYS
public static final int UNIT_WEEKS
public static List<Long> calculateTimeFrame(int lastN, int unit)
List of Long objects representing the begin and end times (in
milliseconds since the epoch) of the timeframe. Returns null instead if the time unit is indicated as
UNIT_COLLECTION_POINTS.lastN - the number of time units in the time frameunit - the unit of time (as defined by UNIT_* constantspublic static org.rhq.core.domain.measurement.ui.MetricDisplaySummary parseMetricToken(String token)
token - A token that follows the form mentioned above.MetricDisplaySummary where the identifiers for resource/group have been set.#getContextKeyChart(MetricDisplaySummary)Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.