Class PageElementResourceStatistics
- java.lang.Object
-
- org.ametys.web.cache.monitoring.process.statistics.impl.PageElementResourceStatistics
-
- All Implemented Interfaces:
ResourceStatistics
public class PageElementResourceStatistics extends Object implements ResourceStatistics
Page element cache stats objects
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
_cacheable
private boolean
_cacheHit
private int
_newHits
private String
_pageElementId
private String
_pageId
private String
_renderingContext
private String
_workspaceJCR
-
Constructor Summary
Constructors Constructor Description PageElementResourceStatistics(String pageElementId, String pageId, String renderingContext, String jcrWorkspace, boolean cacheable, boolean cacheHit, int increment)
Creates a statistics
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private int
_getCacheHits()
void
createStat(org.apache.ibatis.session.SqlSession sqlSession)
Creates and configure a statement with an insert query.int
getHits()
Returns the number of hitsboolean
statExists(org.apache.ibatis.session.SqlSession sqlSession)
Creates and configure a statement with a find query.void
updateStat(org.apache.ibatis.session.SqlSession sqlSession)
Creates and configure a statement with an update query.
-
-
-
Field Detail
-
_pageElementId
private final String _pageElementId
-
_renderingContext
private final String _renderingContext
-
_workspaceJCR
private final String _workspaceJCR
-
_cacheable
private final boolean _cacheable
-
_cacheHit
private final boolean _cacheHit
-
_newHits
private final int _newHits
-
-
Constructor Detail
-
PageElementResourceStatistics
public PageElementResourceStatistics(String pageElementId, String pageId, String renderingContext, String jcrWorkspace, boolean cacheable, boolean cacheHit, int increment)
Creates a statistics- Parameters:
pageElementId
- The page element idpageId
- The page idrenderingContext
- The rendering contextjcrWorkspace
- The jcr workspacecacheable
- The cacheable statuscacheHit
- The cache hit statusincrement
- The number of increment
-
-
Method Detail
-
statExists
public boolean statExists(org.apache.ibatis.session.SqlSession sqlSession)
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
public void createStat(org.apache.ibatis.session.SqlSession sqlSession)
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
public void updateStat(org.apache.ibatis.session.SqlSession sqlSession)
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
public int getHits()
Description copied from interface:ResourceStatistics
Returns the number of hits- Specified by:
getHits
in interfaceResourceStatistics
- Returns:
- int the hits
-
_getCacheHits
private int _getCacheHits()
-
-