Package net.n2oapp.framework.ui.servlet
Class ModifiedClientCacheTemplate
- java.lang.Object
-
- net.n2oapp.framework.mvc.cache.ClientCacheTemplate
-
- net.n2oapp.framework.ui.servlet.ModifiedClientCacheTemplate
-
- All Implemented Interfaces:
java.util.EventListener,N2oEventListener<MetadataChangedEvent>,org.springframework.context.ApplicationListener<MetadataChangedEvent>
public class ModifiedClientCacheTemplate extends ClientCacheTemplate implements N2oEventListener<MetadataChangedEvent>
Шаблон кэширования запросов с хранением времени изменения метаданных в отдельном кэше.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.n2oapp.framework.mvc.cache.ClientCacheTemplate
ClientCacheTemplate.ClientCacheCallback
-
-
Constructor Summary
Constructors Constructor Description ModifiedClientCacheTemplate(org.springframework.cache.CacheManager cacheManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.cache.CachegetCache()protected longgetLastModifiedFromServer(javax.servlet.http.HttpServletRequest req)voidhandleEvent(MetadataChangedEvent event)voidsetCacheRegion(java.lang.String cacheRegion)protected voidsetLastModified(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, long lastModified)-
Methods inherited from class net.n2oapp.framework.mvc.cache.ClientCacheTemplate
execute, getLastModifiedFromClient, ifNotModifiedSince
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.n2oapp.framework.api.event.N2oEventListener
isApply, onApplicationEvent
-
-
-
-
Method Detail
-
getLastModifiedFromServer
protected long getLastModifiedFromServer(javax.servlet.http.HttpServletRequest req)
- Specified by:
getLastModifiedFromServerin classClientCacheTemplate
-
setLastModified
protected void setLastModified(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, long lastModified)- Overrides:
setLastModifiedin classClientCacheTemplate
-
getCache
protected org.springframework.cache.Cache getCache()
-
setCacheRegion
public void setCacheRegion(java.lang.String cacheRegion)
-
handleEvent
public void handleEvent(MetadataChangedEvent event)
- Specified by:
handleEventin interfaceN2oEventListener<MetadataChangedEvent>
-
-