public class PageElementCacheStatsGenerator extends ServiceableGenerator
Modifier and Type | Class and Description |
---|---|
protected class |
PageElementCacheStatsGenerator.PageElementStatsEntry
Object model representing an entry of stats for a PageElement
|
protected class |
PageElementCacheStatsGenerator.PageStatsEntry
Object model representing an entry of stats for a Page
|
Modifier and Type | Field and Description |
---|---|
protected InputDataExtensionPoint |
_inputDataExt
Input Data extension point
|
protected Multimap<String,PageElementCacheStatsGenerator.PageStatsEntry> |
_pageIdMap
Map linking page Id to page stats entries
|
protected ResourceStatisticsComponent |
_resourceStatisticsCmp
Resource statistics component
|
protected SiteManager |
_siteManager
Ametys resolver
|
protected Multimap<PageElementCacheStatsGenerator.PageStatsEntry,PageElementCacheStatsGenerator.PageElementStatsEntry> |
_statsMap
Map of stats entries
|
manager
objectModel, parameters, resolver, source
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
Constructor and Description |
---|
PageElementCacheStatsGenerator() |
dispose
setup
setConsumer, setContentHandler, setLexicalHandler
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setConsumer
protected ResourceStatisticsComponent _resourceStatisticsCmp
protected InputDataExtensionPoint _inputDataExt
protected SiteManager _siteManager
protected Multimap<String,PageElementCacheStatsGenerator.PageStatsEntry> _pageIdMap
protected Multimap<PageElementCacheStatsGenerator.PageStatsEntry,PageElementCacheStatsGenerator.PageElementStatsEntry> _statsMap
public PageElementCacheStatsGenerator()
public void service(ServiceManager sm) throws ServiceException
service
in interface Serviceable
service
in class ServiceableGenerator
ServiceException
public void recycle()
recycle
in interface Recyclable
recycle
in class AbstractGenerator
public void generate() throws IOException, SAXException, ProcessingException
private void _initializePECacheStats() throws ProcessingException
ProcessingException
- if an error occursprivate void _processCacheStatsResultSet(List<Map<String,Object>> rawCacheStats)
private List<String> _getContextsFilter(String contexts)
contexts
- The contextsprivate void _saxStats(Site site, List<String> contexts) throws SAXException
SAXException
private void _saxStats(Sitemap sitemap, List<String> contexts) throws SAXException
SAXException
private void _saxPageStats(Page page, List<String> contexts) throws SAXException
SAXException
private void _saxPageStatsContexts(Page page, List<Zone> zones, List<String> contexts) throws SAXException
SAXException
private void _saxPageStatsContext(PageElementCacheStatsGenerator.PageStatsEntry pageStats, List<Zone> zones) throws SAXException
SAXException
private void _saxZoneStats(Zone zone, Collection<PageElementCacheStatsGenerator.PageElementStatsEntry> pageElementStats) throws SAXException
SAXException
private void _saxZoneItemStats(ZoneItem zoneItem, PageElementCacheStatsGenerator.PageElementStatsEntry entry, int index) throws SAXException
SAXException
private void _addZoneItemSaxInfo(AttributesImpl attrs, ZoneItem zoneItem)
private void _saxInputDataStats(Collection<PageElementCacheStatsGenerator.PageElementStatsEntry> pageElementStats) throws SAXException
SAXException
private void _saxInputDataStatsEntry(PageElementCacheStatsGenerator.PageElementStatsEntry entry, String inputDataId) throws SAXException
SAXException
private PageElementCacheStatsGenerator.PageElementStatsEntry _findPageElementStatsEntry(Collection<PageElementCacheStatsGenerator.PageElementStatsEntry> pageElementStats, String id)