Enum PartitionGranularity
- java.lang.Object
-
- java.lang.Enum<PartitionGranularity>
-
- org.epics.archiverappliance.common.PartitionGranularity
-
- All Implemented Interfaces:
Serializable
,Comparable<PartitionGranularity>
,Constable
public enum PartitionGranularity extends Enum<PartitionGranularity>
A small enum for defining the granularity of the partition. Used principally by the PB storage plugin. The time intervals here have to fit within each other for certain optimizations to work. That is, 5 minutes completely fits within all the granularities larger than it (15,30,60,day,month,year) and 15 minutes completely fits within all the granularities larger than it and so on...- Author:
- mshankar
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description PARTITION_15MIN
PARTITION_30MIN
PARTITION_5MIN
PARTITION_DAY
PARTITION_HOUR
PARTITION_MONTH
PARTITION_YEAR
-
Method Summary
Modifier and Type Method Description int
getApproxMinutesPerChunk()
int
getApproxSecondsPerChunk()
PartitionGranularity
getNextLargerGranularity()
boolean
isSmallerThan(PartitionGranularity other)
static PartitionGranularity
valueOf(String name)
Returns the enum constant of this type with the specified name.static PartitionGranularity[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PARTITION_5MIN
public static final PartitionGranularity PARTITION_5MIN
-
PARTITION_15MIN
public static final PartitionGranularity PARTITION_15MIN
-
PARTITION_30MIN
public static final PartitionGranularity PARTITION_30MIN
-
PARTITION_HOUR
public static final PartitionGranularity PARTITION_HOUR
-
PARTITION_DAY
public static final PartitionGranularity PARTITION_DAY
-
PARTITION_MONTH
public static final PartitionGranularity PARTITION_MONTH
-
PARTITION_YEAR
public static final PartitionGranularity PARTITION_YEAR
-
-
Method Detail
-
values
public static PartitionGranularity[] values()
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PartitionGranularity 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
-
isSmallerThan
public boolean isSmallerThan(PartitionGranularity other)
-
getApproxSecondsPerChunk
public int getApproxSecondsPerChunk()
-
getNextLargerGranularity
public PartitionGranularity getNextLargerGranularity()
-
getApproxMinutesPerChunk
public int getApproxMinutesPerChunk()
-
-