public abstract class StatisticImpl extends Object implements Statistic
Modifier and Type | Field and Description |
---|---|
static String |
LAST_SAMPLE_TIME |
protected static String |
NEWLINE |
protected long |
sampleTime |
static String |
START_TIME |
protected Map<String,Object> |
statMap |
static String |
UNIT_COUNT |
static String |
UNIT_MICROSECOND |
static String |
UNIT_MILLISECOND |
static String |
UNIT_NANOSECOND |
static String |
UNIT_SECOND |
Modifier | Constructor and Description |
---|---|
protected |
StatisticImpl(String name,
String unit,
String desc) |
protected |
StatisticImpl(String name,
String unit,
String desc,
long start_time,
long sample_time) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkMethod(Method method) |
String |
getDescription()
A human-readable description of the Statistic.
|
long |
getLastSampleTime()
The time of the last measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.
|
String |
getName()
The name of this Statistic.
|
long |
getStartTime()
The time of the first measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.
|
Map |
getStaticAsMap() |
String |
getUnit()
The unit of measurement for this Statistic.
|
protected static boolean |
isValidString(String str) |
void |
reset() |
String |
toString() |
protected long sampleTime
public static final String UNIT_COUNT
public static final String UNIT_SECOND
public static final String UNIT_MILLISECOND
public static final String UNIT_MICROSECOND
public static final String UNIT_NANOSECOND
public static final String START_TIME
public static final String LAST_SAMPLE_TIME
protected static final String NEWLINE
protected StatisticImpl(String name, String unit, String desc, long start_time, long sample_time)
public Map getStaticAsMap()
public String getName()
Statistic
public String getDescription()
Statistic
getDescription
in interface Statistic
public String getUnit()
Statistic
public long getLastSampleTime()
Statistic
getLastSampleTime
in interface Statistic
public long getStartTime()
Statistic
getStartTime
in interface Statistic
public void reset()
protected static boolean isValidString(String str)
protected void checkMethod(Method method)
Copyright © 2017 Oracle. All rights reserved.