Class EnumCounters<E extends Enum<E>>

java.lang.Object
org.elasticsearch.xpack.core.common.stats.EnumCounters<E>
All Implemented Interfaces:
Writeable

public class EnumCounters<E extends Enum<E>> extends Object implements Writeable
Utility class similar to org.elasticsearch.xpack.core.watcher.common.stats.Counters, but it is using Enum instead of string to identify the counter. The serialization happens using enum ordinals similar to StreamOutput.writeEnum(Enum), which means that ordinal for existing enums should remain the same for backward and forward compatibility of the serialization protocol.