U - The type of RrdUpdater this primitive belongs toE - The enum type being storedclass RrdEnum<U extends RrdUpdater<U>,E extends Enum<E>> extends RrdPrimitive<U>
This class provides methods to store and retrieve enum values in RRD files. It handles the conversion between enum constants and their string representations, with caching support for performance optimization.
RRD_DOUBLE, RRD_INT, RRD_LONG, RRD_PRIM_SIZES, RRD_STRING, STRING_LENGTH| Constructor and Description |
|---|
RrdEnum(RrdUpdater<U> updater,
boolean isConstant,
Class<E> clazz) |
RrdEnum(RrdUpdater<U> updater,
Class<E> clazz) |
| Modifier and Type | Method and Description |
|---|---|
(package private) E |
get()
Gets the enum value.
|
(package private) String |
name()
Gets the name of the enum value.
|
(package private) void |
set(E value)
Sets the enum value.
|
isCachingAllowed, readBytes, readDouble, readDouble, readDouble, readEnum, readInt, readLong, readString, writeBytes, writeDouble, writeDouble, writeDouble, writeDouble, writeEnum, writeInt, writeLong, writeStringRrdEnum(RrdUpdater<U> updater, boolean isConstant, Class<E> clazz)
RrdEnum(RrdUpdater<U> updater, Class<E> clazz)
E get() throws IOException
IOException - if an I/O error occursString name() throws IOException
IOException - if an I/O error occursvoid set(E value) throws IOException
value - the enum value to setIOException - if an I/O error occurs