Class KeyRegistry

java.lang.Object
com.streambase.sb.monitor.KeyRegistry

class KeyRegistry extends Object
For Stat schema v3.
  • Field Details

    • EMPTY

      static final KeyRegistry EMPTY
      Empty registry
  • Constructor Details

    • KeyRegistry

      KeyRegistry()
  • Method Details

    • register

      public KeyRegistry register(StatsUtil.StatEncoder.KeyType type, String... key)
      Register the keys with the type
      Parameters:
      type - key type
      key - key value
      Returns:
      key registry updated key registry
    • index

      public int 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 buffer
      Parameters:
      type - key type
      k - key value
      Returns:
      key index
    • count

      public int count(StatsUtil.StatEncoder.KeyType type)
      Number of keys of this type in registry
      Parameters:
      type - key type
      Returns:
      number of keys of that type
    • withId

      public KeyRegistry withId()
      Acronym of register(KeyType.Long, StatKey.ID)
      Returns:
      the same registry