private OnDemandStatsProducer < PageInBrowserStats > createProducer ( final String producerId , final String category , final String subsystem ) { OnDemandStatsProducer < PageInBrowserStats > producer = limit == - 1 ? new OnDemandStatsProducer < PageInBrowserStats > ( producerId , category , subsystem , new PageInBrowserStatsFactory ( ) ) : new EntryCountLimitedOnDemandStatsProducer < PageInBrowserStats > ( producerId , category , subsystem , new PageInBrowserStatsFactory ( ) , limit ) ; ProducerRegistryFactory . getProducerRegistryInstance ( ) . registerProducer ( producer ) ; return producer ; }
Creates producer with given producer id category and subsystem and register it in producer registry .