Class FrontFromHTTPServerResourceStatistics
- java.lang.Object
-
- org.ametys.web.cache.monitoring.process.statistics.impl.FrontFromHTTPServerResourceStatistics
-
- All Implemented Interfaces:
ResourceStatistics
public class FrontFromHTTPServerResourceStatistics extends Object implements ResourceStatistics
Front from apache cache stats objects
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
_frontCacheable
private boolean
_frontCacheHit1
private boolean
_frontCacheHit2
private String
_frontPath
private String
_frontPathHash
private String
_frontSite
private boolean
_httpserverCacheHit
private String
_httpserverPath
private String
_httpserverPathHash
private String
_httpserverSite
private int
_newHits
-
Constructor Summary
Constructors Constructor Description FrontFromHTTPServerResourceStatistics(String httpserverSite, String httpserverPathHash, String httpserverPath, boolean httpserverCacheHit, String frontSite, String frontPathHash, String frontPath, boolean frontCacheable, boolean frontCacheHit1, boolean frontCacheHit2, int newHits)
Creates a statistic
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private int
_getFrontCacheHits1()
private int
_getFrontCacheHits2()
private int
_getServerCacheHits()
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
-
_httpserverSite
private final String _httpserverSite
-
_httpserverPath
private final String _httpserverPath
-
_httpserverPathHash
private final String _httpserverPathHash
-
_httpserverCacheHit
private final boolean _httpserverCacheHit
-
_frontSite
private final String _frontSite
-
_frontPath
private final String _frontPath
-
_frontPathHash
private final String _frontPathHash
-
_frontCacheable
private final boolean _frontCacheable
-
_frontCacheHit1
private final boolean _frontCacheHit1
-
_frontCacheHit2
private final boolean _frontCacheHit2
-
_newHits
private final int _newHits
-
-
Constructor Detail
-
FrontFromHTTPServerResourceStatistics
public FrontFromHTTPServerResourceStatistics(String httpserverSite, String httpserverPathHash, String httpserverPath, boolean httpserverCacheHit, String frontSite, String frontPathHash, String frontPath, boolean frontCacheable, boolean frontCacheHit1, boolean frontCacheHit2, int newHits)
Creates a statistic- Parameters:
httpserverSite
- The httpserver sitehttpserverPathHash
- a consistent hash of the httpserver path.httpserverPath
- The httpserver pathhttpserverCacheHit
- The httpserver cache hitfrontSite
- The front sitefrontPathHash
- a consistent hash of the front path.frontPath
- The front pathfrontCacheable
- The front cacheable statusfrontCacheHit1
- The front cache hit 1 statusfrontCacheHit2
- The front cache hit 2 statusnewHits
- The 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
-
_getServerCacheHits
private int _getServerCacheHits()
-
_getFrontCacheHits1
private int _getFrontCacheHits1()
-
_getFrontCacheHits2
private int _getFrontCacheHits2()
-
-