public class CacheAccessManager extends AbstractLogEnabled implements Component, Initializable, Serviceable, Contextualizable, ThreadSafe
| Modifier and Type | Field and Description | 
|---|---|
| protected Context | _contextThe cocoon context. | 
| protected ConcurrentMap<String,Boolean> | _pageCacheableA Map keeping record of whether the pages are cacheable or not. | 
| protected ConcurrentMap<String,ReentrantLock> | _pageLocksMap of page cache locks. | 
| protected SAXParser | _parserA SAX parser. | 
| protected BackOfficeRequestProxyExtensionPoint | _requestProxyExtensionPointThe extension point for adding request headers in BO request | 
| static String | ROLEThe avalon role. | 
| Constructor and Description | 
|---|
| CacheAccessManager() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected boolean | _isCacheable(String pagePath)Get the cacheable status of a page from the back-office. | 
| void | contextualize(Context context) | 
| void | initialize() | 
| boolean | isCacheable(String pagePath)Tests if the page is cacheable. | 
| void | reset()Resets all the local caches and locks. | 
| void | resetPage(String pagePath)Remove a specified page path from the local cache and lock. | 
| void | service(ServiceManager serviceManager) | 
| void | unlock(String pagePath)Release the lock associated with a page. | 
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected ConcurrentMap<String,Boolean> _pageCacheable
protected ConcurrentMap<String,ReentrantLock> _pageLocks
protected BackOfficeRequestProxyExtensionPoint _requestProxyExtensionPoint
public CacheAccessManager()
public void initialize() throws Exception
initialize in interface InitializableExceptionpublic void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic void service(ServiceManager serviceManager) throws ServiceException
service in interface ServiceableServiceExceptionpublic boolean isCacheable(String pagePath) throws IOException
GeneratePageAction).pagePath - the page path.IOException - if an error occurs sending the cacheability request to the back-office.GeneratePageActionpublic void unlock(String pagePath)
pagePath - the page path.public void reset()
public void resetPage(String pagePath)
pagePath - the page path.protected boolean _isCacheable(String pagePath) throws IOException
pagePath - the page path.IOException - in case of a problem or the connection was aborted