Enum MonitoringConstants.Period
- java.lang.Object
-
- java.lang.Enum<MonitoringConstants.Period>
-
- org.ametys.runtime.plugins.admin.jvmstatus.monitoring.MonitoringConstants.Period
-
- All Implemented Interfaces:
Serializable
,Comparable<MonitoringConstants.Period>
- Enclosing interface:
- MonitoringConstants
public static enum MonitoringConstants.Period extends Enum<MonitoringConstants.Period>
Period to archive and to render.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LAST_DAY
Last 24 hours.LAST_HOUR
Last hour.LAST_MONTH
Last month.LAST_WEEK
Last week.LAST_YEAR
Last year.
-
Constructor Summary
Constructors Modifier Constructor Description private
Period()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getTime()
Returns the time in seconds for current period.static MonitoringConstants.Period
valueOf(String name)
Returns the enum constant of this type with the specified name.static MonitoringConstants.Period[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LAST_HOUR
public static final MonitoringConstants.Period LAST_HOUR
Last hour.
-
LAST_DAY
public static final MonitoringConstants.Period LAST_DAY
Last 24 hours.
-
LAST_WEEK
public static final MonitoringConstants.Period LAST_WEEK
Last week.
-
LAST_MONTH
public static final MonitoringConstants.Period LAST_MONTH
Last month.
-
LAST_YEAR
public static final MonitoringConstants.Period LAST_YEAR
Last year.
-
-
Constructor Detail
-
Period
private Period()
-
-
Method Detail
-
values
public static MonitoringConstants.Period[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MonitoringConstants.Period c : MonitoringConstants.Period.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MonitoringConstants.Period valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getTime
public long getTime()
Returns the time in seconds for current period.- Returns:
- the time.
-
-