public void registerCounter ( ByteString counterName , CounterEventGenerator generator , TopologyChangeListener topologyChangeListener ) { if ( counters . putIfAbsent ( counterName , new Holder ( generator , topologyChangeListener ) ) != null ) { throw new IllegalStateException ( ) ; } }
It registers a new counter created locally .