コード例 #1
0
  public static BrokerTopicStat getBrokerTopicStat(String topic) {
    BrokerTopicStat state = BrokerTopicStatHolder.states.get(topic);
    if (state == null) {
      state = new BrokerTopicStat();
      state.mBeanName = "jafka:type=jafka.BrokerTopicStat." + topic;
      if (null == BrokerTopicStatHolder.states.putIfNotExists(topic, state)) {
        Utils.registerMBean(state);
      }
      state = BrokerTopicStatHolder.states.get(topic);
    }

    return state;
  }
コード例 #2
0
 static {
   allTopicState.mBeanName = "jafka:type=jafka.BrokerAllTopicStat";
   Utils.registerMBean(allTopicState);
 }