com.netflix.servo.annotations
Enum DataSourceType

java.lang.Object
  extended by java.lang.Enum<DataSourceType>
      extended by com.netflix.servo.annotations.DataSourceType
All Implemented Interfaces:
Tag, java.io.Serializable, java.lang.Comparable<DataSourceType>

public enum DataSourceType
extends java.lang.Enum<DataSourceType>
implements Tag

Indicates the type of value that is annotated to determine how it will be measured.


Enum Constant Summary
COUNTER
          A counter is for numeric values that get incremented when some event occurs.
GAUGE
          A gauge is for numeric values that can be sampled without modification.
INFORMATIONAL
          An informational attribute is for values that might be useful for debugging, but will not be collected as metrics for monitoring purposes.
RATE
          A rate is for numeric values that represent a rate per second.
 
Field Summary
static java.lang.String KEY
          Key name used for the data source type tag.
 
Method Summary
 java.lang.String getKey()
          Returns the key corresponding to this tag.
 java.lang.String getValue()
          Returns the value corresponding to this tag.
 java.lang.String tagString()
          Returns the string representation of this tag.
static DataSourceType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DataSourceType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

GAUGE

public static final DataSourceType GAUGE
A gauge is for numeric values that can be sampled without modification. Examples of metrics that should be gauges are things like current temperature, number of open connections, disk usage, etc.


COUNTER

public static final DataSourceType COUNTER
A counter is for numeric values that get incremented when some event occurs. Counters will be sampled and converted into a rate of change per second. Counter values should be monotonically increasing, i.e., the value should not decrease.


RATE

public static final DataSourceType RATE
A rate is for numeric values that represent a rate per second.


INFORMATIONAL

public static final DataSourceType INFORMATIONAL
An informational attribute is for values that might be useful for debugging, but will not be collected as metrics for monitoring purposes. These values are made available in JMX.

Field Detail

KEY

public static final java.lang.String KEY
Key name used for the data source type tag.

See Also:
Constant Field Values
Method Detail

values

public static DataSourceType[] 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 (DataSourceType c : DataSourceType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DataSourceType valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getKey

public java.lang.String getKey()
Returns the key corresponding to this tag.

Specified by:
getKey in interface Tag

getValue

public java.lang.String getValue()
Returns the value corresponding to this tag.

Specified by:
getValue in interface Tag

tagString

public java.lang.String tagString()
Returns the string representation of this tag.

Specified by:
tagString in interface Tag