Class PageElementCacheStatsGenerator
- java.lang.Object
- 
- org.apache.avalon.framework.logger.AbstractLogEnabled
- 
- org.apache.cocoon.xml.AbstractXMLProducer
- 
- org.apache.cocoon.generation.AbstractGenerator
- 
- org.apache.cocoon.generation.ServiceableGenerator
- 
- org.ametys.web.cache.monitoring.ui.PageElementCacheStatsGenerator
 
 
 
 
 
- 
- All Implemented Interfaces:
- Poolable,- Recyclable,- Disposable,- Component,- LogEnabled,- Serviceable,- Generator,- SitemapModelComponent,- XMLProducer
 
 public class PageElementCacheStatsGenerator extends ServiceableGenerator Cache stats generator for related to the back-office (pages and page elements)
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected classPageElementCacheStatsGenerator.PageElementStatsEntryObject model representing an entry of stats for a PageElementprotected classPageElementCacheStatsGenerator.PageStatsEntryObject model representing an entry of stats for a Page
 - 
Field SummaryFields Modifier and Type Field Description protected InputDataExtensionPoint_inputDataExtInput Data extension pointprotected Multimap<String,PageElementCacheStatsGenerator.PageStatsEntry>_pageIdMapMap linking page Id to page stats entriesprotected ResourceStatisticsComponent_resourceStatisticsCmpResource statistics componentprotected SiteManager_siteManagerAmetys resolverprotected Multimap<PageElementCacheStatsGenerator.PageStatsEntry,PageElementCacheStatsGenerator.PageElementStatsEntry>_statsMapMap of stats entries- 
Fields inherited from class org.apache.cocoon.generation.ServiceableGeneratormanager
 - 
Fields inherited from class org.apache.cocoon.generation.AbstractGeneratorobjectModel, parameters, resolver, source
 - 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducercontentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
- 
 - 
Constructor SummaryConstructors Constructor Description PageElementCacheStatsGenerator()
 - 
Method Summary- 
Methods inherited from class org.apache.cocoon.generation.ServiceableGeneratordispose
 - 
Methods inherited from class org.apache.cocoon.generation.AbstractGeneratorsetup
 - 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducersetConsumer, setContentHandler, setLexicalHandler
 - 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabledenableLogging, getLogger, setupLogger, setupLogger, setupLogger
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.cocoon.xml.XMLProducersetConsumer
 
- 
 
- 
- 
- 
Field Detail- 
_resourceStatisticsCmpprotected ResourceStatisticsComponent _resourceStatisticsCmp Resource statistics component
 - 
_inputDataExtprotected InputDataExtensionPoint _inputDataExt Input Data extension point
 - 
_siteManagerprotected SiteManager _siteManager Ametys resolver
 - 
_pageIdMapprotected Multimap<String,PageElementCacheStatsGenerator.PageStatsEntry> _pageIdMap Map linking page Id to page stats entries
 - 
_statsMapprotected Multimap<PageElementCacheStatsGenerator.PageStatsEntry,PageElementCacheStatsGenerator.PageElementStatsEntry> _statsMap Map of stats entries
 
- 
 - 
Constructor Detail- 
PageElementCacheStatsGeneratorpublic PageElementCacheStatsGenerator() 
 
- 
 - 
Method Detail- 
servicepublic void service(ServiceManager sm) throws ServiceException - Specified by:
- servicein interface- Serviceable
- Overrides:
- servicein class- ServiceableGenerator
- Throws:
- ServiceException
 
 - 
recyclepublic void recycle() - Specified by:
- recyclein interface- Recyclable
- Overrides:
- recyclein class- AbstractGenerator
 
 - 
generatepublic void generate() throws IOException, SAXException, ProcessingException 
 - 
_initializePECacheStatsprivate void _initializePECacheStats() throws ProcessingException Initialize statistics by retrieving data from the monitoring database.- Throws:
- ProcessingException- if an error occurs
 
 - 
_processCacheStatsResultSetprivate void _processCacheStatsResultSet(List<Map<String,Object>> rawCacheStats) 
 - 
_getContextsFilterprivate List<String> _getContextsFilter(String contexts) Analyse the 'contexts' parameter to filter the data to sax depending on requested contexts. A context is a couple as follows : 'renderingContext' - 'workspaceJcr'- Parameters:
- contexts- The contexts
- Returns:
- the list of filters for the given contexts
 
 - 
_saxStatsprivate void _saxStats(Site site, List<String> contexts) throws SAXException - Throws:
- SAXException
 
 - 
_saxStatsprivate void _saxStats(Sitemap sitemap, List<String> contexts) throws SAXException - Throws:
- SAXException
 
 - 
_saxPageStatsprivate void _saxPageStats(Page page, List<String> contexts) throws SAXException - Throws:
- SAXException
 
 - 
_saxPageStatsContextsprivate void _saxPageStatsContexts(Page page, List<Zone> zones, List<String> contexts) throws SAXException - Throws:
- SAXException
 
 - 
_saxPageStatsContextprivate void _saxPageStatsContext(PageElementCacheStatsGenerator.PageStatsEntry pageStats, List<Zone> zones) throws SAXException - Throws:
- SAXException
 
 - 
_saxZoneStatsprivate void _saxZoneStats(Zone zone, Collection<PageElementCacheStatsGenerator.PageElementStatsEntry> pageElementStats) throws SAXException - Throws:
- SAXException
 
 - 
_saxZoneItemStatsprivate void _saxZoneItemStats(ZoneItem zoneItem, PageElementCacheStatsGenerator.PageElementStatsEntry entry, int index) throws SAXException - Throws:
- SAXException
 
 - 
_addZoneItemSaxInfoprivate void _addZoneItemSaxInfo(AttributesImpl attrs, ZoneItem zoneItem) 
 - 
_saxInputDataStatsprivate void _saxInputDataStats(Collection<PageElementCacheStatsGenerator.PageElementStatsEntry> pageElementStats) throws SAXException - Throws:
- SAXException
 
 - 
_saxInputDataStatsEntryprivate void _saxInputDataStatsEntry(PageElementCacheStatsGenerator.PageElementStatsEntry entry, String inputDataId) throws SAXException - Throws:
- SAXException
 
 - 
_findPageElementStatsEntryprivate PageElementCacheStatsGenerator.PageElementStatsEntry _findPageElementStatsEntry(Collection<PageElementCacheStatsGenerator.PageElementStatsEntry> pageElementStats, String id) 
 
- 
 
-