Class ServersCacheStatsGenerator
- 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.ServersCacheStatsGenerator
-
- All Implemented Interfaces:
Poolable,Recyclable,Disposable,Component,LogEnabled,Serviceable,Generator,SitemapModelComponent,XMLProducer
public class ServersCacheStatsGenerator extends ServiceableGenerator
Cache stats generator grouping data collected across each server cache (http server/front/back)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classServersCacheStatsGenerator.BackStatsEntryObject model representing an entry of stats for a back resource (ie.protected classServersCacheStatsGenerator.FrontFromFrontStatsEntryObject model representing an entry of stats for a front resource, coming from the Front (direct request to tomcat, bypassing any HTTP server if any).protected classServersCacheStatsGenerator.FrontFromHTTPServerStatsEntryObject model representing an entry of stats for a front resource, coming from httpserverprotected classServersCacheStatsGenerator.RawStatsEntryObject model representing a raw entry of stats retrieved through the DB.
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,ServersCacheStatsGenerator.BackStatsEntry>_backStatsMap containing back stats entries classified by pathprotected Map<String,Map<String,ServersCacheStatsGenerator.FrontFromFrontStatsEntry>>_fromFrontOnlyStatsMultimap containing (only) front stats entries classified by site name and pathprotected Map<String,Map<String,ServersCacheStatsGenerator.FrontFromHTTPServerStatsEntry>>_fromHTTPServerStatsMultimap containing httpserver stats entries classified by site name and pathprotected Map<String,Multimap<String,String>>_pathMapsMultimaps representing the all the paths to the resources in a recursive way.protected Multimap<String,String>_pathSanitizerThis multimap associates site names to a list of prefix.protected ResourceStatisticsComponent_resourceStatisticsCmpResource statistics componentprotected SiteManager_siteManagerAmetys resolverprotected static String[]_SPECIAL_PATH_PREFIXSList of paths used to during the sanitize process of the server path-
Fields inherited from class org.apache.cocoon.generation.ServiceableGenerator
manager
-
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, source
-
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
-
-
Constructor Summary
Constructors Constructor Description ServersCacheStatsGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerate()voidrecycle()voidservice(ServiceManager sm)-
Methods inherited from class org.apache.cocoon.generation.ServiceableGenerator
dispose
-
Methods inherited from class org.apache.cocoon.generation.AbstractGenerator
setup
-
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
-
-
-
-
Field Detail
-
_SPECIAL_PATH_PREFIXS
protected static final String[] _SPECIAL_PATH_PREFIXS
List of paths used to during the sanitize process of the server path
-
_resourceStatisticsCmp
protected ResourceStatisticsComponent _resourceStatisticsCmp
Resource statistics component
-
_siteManager
protected SiteManager _siteManager
Ametys resolver
-
_pathSanitizer
protected Multimap<String,String> _pathSanitizer
This multimap associates site names to a list of prefix. This is needed to sanitize the server path.
-
_pathMaps
protected Map<String,Multimap<String,String>> _pathMaps
Multimaps representing the all the paths to the resources in a recursive way. The map key's are the site names.
-
_fromHTTPServerStats
protected Map<String,Map<String,ServersCacheStatsGenerator.FrontFromHTTPServerStatsEntry>> _fromHTTPServerStats
Multimap containing httpserver stats entries classified by site name and path
-
_fromFrontOnlyStats
protected Map<String,Map<String,ServersCacheStatsGenerator.FrontFromFrontStatsEntry>> _fromFrontOnlyStats
Multimap containing (only) front stats entries classified by site name and path
-
_backStats
protected Map<String,ServersCacheStatsGenerator.BackStatsEntry> _backStats
Map containing back stats entries classified by path
-
-
Constructor Detail
-
ServersCacheStatsGenerator
public ServersCacheStatsGenerator()
-
-
Method Detail
-
service
public void service(ServiceManager sm) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classServiceableGenerator- Throws:
ServiceException
-
generate
public void generate() throws IOException, SAXException, ProcessingException
-
recycle
public void recycle()
- Specified by:
recyclein interfaceRecyclable- Overrides:
recyclein classAbstractGenerator
-
-