Class HTTPServerOnlyResourceStatistics
java.lang.Object
org.ametys.web.cache.monitoring.process.statistics.impl.HTTPServerOnlyResourceStatistics
- All Implemented Interfaces:
ResourceStatistics
Apache cache stats objects
-
Constructor Summary
ConstructorDescriptionHTTPServerOnlyResourceStatistics
(String site, String hashPath, String path, boolean cacheHit, int newHits) Creates a statistics -
Method Summary
Modifier and TypeMethodDescriptionvoid
createStat
(SqlSession sqlSession) Creates and configure a statement with an insert query.int
getHits()
Returns the number of hitsboolean
statExists
(SqlSession sqlSession) Creates and configure a statement with a find query.void
updateStat
(SqlSession sqlSession) Creates and configure a statement with an update query.
-
Constructor Details
-
HTTPServerOnlyResourceStatistics
public HTTPServerOnlyResourceStatistics(String site, String hashPath, String path, boolean cacheHit, int newHits) Creates a statistics- Parameters:
site
- The sitehashPath
- a consistent hash of the path.path
- The pathcacheHit
- The cache hit statusnewHits
- The number of hits
-
-
Method Details
-
statExists
Description copied from interface:ResourceStatistics
Creates and configure a statement with a find query.- Specified by:
statExists
in interfaceResourceStatistics
- Parameters:
sqlSession
- The sql session- Returns:
- A non null ready to execute prepared statement
-
createStat
Description copied from interface:ResourceStatistics
Creates and configure a statement with an insert query.- Specified by:
createStat
in interfaceResourceStatistics
- Parameters:
sqlSession
- The sql session
-
updateStat
Description copied from interface:ResourceStatistics
Creates and configure a statement with an update query.- Specified by:
updateStat
in interfaceResourceStatistics
- Parameters:
sqlSession
- The sql session
-
getHits
Description copied from interface:ResourceStatistics
Returns the number of hits- Specified by:
getHits
in interfaceResourceStatistics
- Returns:
- int the hits
-