Package org.jboss.byteman.sample.helper
Class KeyInfo
- java.lang.Object
-
- org.jboss.byteman.sample.helper.KeyInfo
-
public class KeyInfo extends java.lang.Object
Auxiliary class used by the rule set to provide information about which counters the rule system will be updating and how it wants them to be presented in the JMX bean display
-
-
Field Summary
Fields Modifier and Type Field Description static int
KEY_TYPE_CUMULATIVE
type value identifying a counter whose value should be treated as a running total.static int
KEY_TYPE_MEAN
type value identifying a counter whose value should be used to compute a running average by dividing the running total for the last N samples by N where N is 5.static int
KEY_TYPE_RATE
type value identifying a counter whose value should be used to compute a rate by dividing the sampled count by the time in seconds over which the sample was obtained.private int
keyCount
how many keys there areprivate java.lang.String[]
keyLabels
the keys for each of the counters being sampledprivate java.lang.String[]
keyNames
the keys for each of the counters being sampledprivate int[]
keyTypes
the type of information each sampled counter is being used to collectprivate java.lang.String
label
A label for the collection of stats to use in the JMX bean display
-
Constructor Summary
Constructors Constructor Description KeyInfo()
KeyInfo(java.lang.String label)
KeyInfo(java.lang.String label, java.lang.String[] keyNames)
KeyInfo(java.lang.String label, java.lang.String[] keyNames, int[] keyTypes)
KeyInfo(java.lang.String label, java.lang.String[] keyNames, int[] keyTypes, java.lang.String[] keyLabels)
KeyInfo(java.lang.String label, java.lang.String[] keyNames, java.lang.String[] keyLabels)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addKey(java.lang.String keyName)
KeyInfo
addKey(java.lang.String keyName, int keyType)
KeyInfo
addKey(java.lang.String keyName, int keyType, java.lang.String keyLabel)
int
getKeyCount()
java.lang.String[]
getKeyLabels()
java.lang.String[]
getKeyNames()
int[]
getKeyTypes()
java.lang.String
getLabel()
-
-
-
Field Detail
-
KEY_TYPE_CUMULATIVE
public static final int KEY_TYPE_CUMULATIVE
type value identifying a counter whose value should be treated as a running total. the value is displayed as an int.- See Also:
- Constant Field Values
-
KEY_TYPE_RATE
public static final int KEY_TYPE_RATE
type value identifying a counter whose value should be used to compute a rate by dividing the sampled count by the time in seconds over which the sample was obtained. the value is displayed as a float.- See Also:
- Constant Field Values
-
KEY_TYPE_MEAN
public static final int KEY_TYPE_MEAN
type value identifying a counter whose value should be used to compute a running average by dividing the running total for the last N samples by N where N is 5. the value is displayed as a float.- See Also:
- Constant Field Values
-
label
private java.lang.String label
A label for the collection of stats to use in the JMX bean display
-
keyCount
private int keyCount
how many keys there are
-
keyNames
private java.lang.String[] keyNames
the keys for each of the counters being sampled
-
keyTypes
private int[] keyTypes
the type of information each sampled counter is being used to collect
-
keyLabels
private java.lang.String[] keyLabels
the keys for each of the counters being sampled
-
-
Constructor Detail
-
KeyInfo
public KeyInfo()
-
KeyInfo
public KeyInfo(java.lang.String label)
-
KeyInfo
public KeyInfo(java.lang.String label, java.lang.String[] keyNames)
-
KeyInfo
public KeyInfo(java.lang.String label, java.lang.String[] keyNames, java.lang.String[] keyLabels)
-
KeyInfo
public KeyInfo(java.lang.String label, java.lang.String[] keyNames, int[] keyTypes)
-
KeyInfo
public KeyInfo(java.lang.String label, java.lang.String[] keyNames, int[] keyTypes, java.lang.String[] keyLabels)
-
-
Method Detail
-
getLabel
public java.lang.String getLabel()
-
getKeyCount
public int getKeyCount()
-
getKeyNames
public java.lang.String[] getKeyNames()
-
getKeyTypes
public int[] getKeyTypes()
-
getKeyLabels
public java.lang.String[] getKeyLabels()
-
addKey
public void addKey(java.lang.String keyName)
-
addKey
public KeyInfo addKey(java.lang.String keyName, int keyType)
-
addKey
public KeyInfo addKey(java.lang.String keyName, int keyType, java.lang.String keyLabel)
-
-