Class FrontOnlyResourceStatistics
- java.lang.Object
-
- org.ametys.web.cache.monitoring.process.statistics.impl.FrontOnlyResourceStatistics
-
- All Implemented Interfaces:
ResourceStatistics
public class FrontOnlyResourceStatistics extends Object implements ResourceStatistics
Front (without apache) cache stats objects
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
_cacheable
private boolean
_cacheHit1
private boolean
_cacheHit2
private String
_hashPath
private int
_newHits
private String
_path
private String
_site
-
Constructor Summary
Constructors Constructor Description FrontOnlyResourceStatistics(String site, String hashPath, String path, boolean cacheable, boolean cacheHit1, boolean cacheHit2, int newHits)
Creates a statistics
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private int
_getCacheHits1()
private int
_getCacheHits2()
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
-
_cacheable
private final boolean _cacheable
-
_cacheHit1
private final boolean _cacheHit1
-
_cacheHit2
private final boolean _cacheHit2
-
_newHits
private final int _newHits
-
-
Constructor Detail
-
FrontOnlyResourceStatistics
public FrontOnlyResourceStatistics(String site, String hashPath, String path, boolean cacheable, boolean cacheHit1, boolean cacheHit2, int newHits)
Creates a statistics- Parameters:
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 hits
-
-
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
-
_getCacheHits1
private int _getCacheHits1()
-
_getCacheHits2
private int _getCacheHits2()
-
-