public class FrontOnlyResourceStatistics extends Object implements ResourceStatistics
Modifier and Type | Field and Description |
---|---|
private boolean |
_cacheable |
private boolean |
_cacheHit1 |
private boolean |
_cacheHit2 |
private String |
_hashPath |
private int |
_newHits |
private String |
_path |
private String |
_site |
Constructor and Description |
---|
FrontOnlyResourceStatistics(String site,
String hashPath,
String path,
boolean cacheable,
boolean cacheHit1,
boolean cacheHit2,
int newHits)
Creates a statistics
|
Modifier and Type | Method and Description |
---|---|
private int |
_getCacheHits1() |
private int |
_getCacheHits2() |
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 boolean _cacheable
private final boolean _cacheHit1
private final boolean _cacheHit2
private final int _newHits
public FrontOnlyResourceStatistics(String site, String hashPath, String path, boolean cacheable, boolean cacheHit1, boolean cacheHit2, int newHits)
site
- The sitehashPath
- a consistent hash of the path.path
- The pathcacheable
- The cacheable statuscacheHit1
- The cache hit 1 statuscacheHit2
- The cache hit 2 statusnewHits
- The number of 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
private int _getCacheHits1()
private int _getCacheHits2()