Package com.streambase.sb.monitor
Class KeyRegistry
java.lang.Object
com.streambase.sb.monitor.KeyRegistry
For Stat schema v3.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Number of keys of this type in registryint
index
(StatsUtil.StatEncoder.KeyType type, String k) Given type and key, return the index of which the value of the key should be put at on the bufferregister
(StatsUtil.StatEncoder.KeyType type, String... key) Register the keys with the typewithId()
Acronym of register(KeyType.Long, StatKey.ID)
-
Field Details
-
EMPTY
Empty registry
-
-
Constructor Details
-
KeyRegistry
KeyRegistry()
-
-
Method Details
-
register
Register the keys with the type- Parameters:
type
- key typekey
- key value- Returns:
- key registry updated key registry
-
index
Given type and key, return the index of which the value of the key should be put at on the buffer- Parameters:
type
- key typek
- key value- Returns:
- key index
-
count
Number of keys of this type in registry- Parameters:
type
- key type- Returns:
- number of keys of that type
-
withId
Acronym of register(KeyType.Long, StatKey.ID)- Returns:
- the same registry
-