public class HTTPServerOnlyResourceStatistics extends Object implements ResourceStatistics
Modifier and Type | Field and Description |
---|---|
private boolean |
_cacheHit |
private String |
_hashPath |
private int |
_newHits |
private String |
_path |
private String |
_site |
Constructor and Description |
---|
HTTPServerOnlyResourceStatistics(String site,
String hashPath,
String path,
boolean cacheHit,
int newHits)
Creates a statistics
|
Modifier and Type | Method and Description |
---|---|
private int |
_getCacheHits() |
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.
|
public HTTPServerOnlyResourceStatistics(String site, String hashPath, String path, boolean cacheHit, int newHits)
site
- The sitehashPath
- a consistent hash of the path.path
- The pathcacheHit
- The cache hit 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 _getCacheHits()