public class PageResourceStatistics extends Object implements ResourceStatistics
Modifier and Type | Field and Description |
---|---|
private boolean |
_cacheable |
private String |
_hashPath |
private int |
_newHits |
private String |
_pageId |
private String |
_path |
private String |
_renderingContext |
private String |
_workspaceJCR |
Constructor and Description |
---|
PageResourceStatistics(String pageId,
String hashPath,
String path,
String renderingContext,
String jcrWorkspace,
boolean cacheable,
int increment)
Creates a page resource statistics
|
Modifier and Type | Method and Description |
---|---|
void |
createStat(SqlSession sqlSession)
Creates and configure a statement with an insert query.
|
int |
getHits()
Returns the number of hits
|
boolean |
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.
|
private final String _renderingContext
private final String _workspaceJCR
private final boolean _cacheable
private final int _newHits
public PageResourceStatistics(String pageId, String hashPath, String path, String renderingContext, String jcrWorkspace, boolean cacheable, int increment)
pageId
- The page idhashPath
- a consistent hash of the path.path
- The associated pathrenderingContext
- The rendering contextjcrWorkspace
- The jcr workspacecacheable
- Is the page cacheable ?increment
- Number of associated hitspublic boolean statExists(SqlSession sqlSession)
ResourceStatistics
statExists
in interface ResourceStatistics
sqlSession
- The sql sessionpublic void createStat(SqlSession sqlSession)
ResourceStatistics
createStat
in interface ResourceStatistics
sqlSession
- The sql sessionpublic void updateStat(SqlSession sqlSession)
ResourceStatistics
updateStat
in interface ResourceStatistics
sqlSession
- The sql sessionpublic int getHits()
ResourceStatistics
getHits
in interface ResourceStatistics