public abstract class AbstractSiteCacheObserver extends AbstractCacheObserver implements Serviceable
Observer
for invalidate site data.Modifier and Type | Field and Description |
---|---|
protected CacheInvalidationPolicy |
_cachePolicy
Cache invalidation policy
|
protected Repository |
_repository
JCR repository.
|
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
AbstractSiteCacheObserver() |
Modifier and Type | Method and Description |
---|---|
protected abstract Site |
_getSite(Event event)
Retrieves the site needed for accessing the front-office.
|
protected abstract void |
_internalObserve(Event event,
Site site,
Session liveSession)
Observes the event with access to the target site and live workspace.
|
void |
observe(Event event,
Map<String,Object> transientVars)
Observes an event.
|
void |
service(ServiceManager manager) |
getPriority
getLogger, setLogger
protected Repository _repository
protected CacheInvalidationPolicy _cachePolicy
public AbstractSiteCacheObserver()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void observe(Event event, Map<String,Object> transientVars) throws Exception
Observer
observe
in interface Observer
event
- the event.transientVars
- transientVars passed from one Observer to another when processing a single Event.
This may allow optimizations between observers.Exception
- if an error occurs.
All exceptions will be logged but not propagated, as the observation mechanism should never fail.protected abstract Site _getSite(Event event)
event
- the event.null
if not found.protected abstract void _internalObserve(Event event, Site site, Session liveSession) throws Exception
event
- the event.site
- the site.liveSession
- the session to the workspace live.Exception
- if an error occurs.