info.magnolia.module.cache
Class FlushAllListeningPolicy
java.lang.Object
info.magnolia.module.cache.AbstractListeningFlushPolicy
info.magnolia.module.cache.FlushAllListeningPolicy
- All Implemented Interfaces:
- FlushPolicy
public class FlushAllListeningPolicy
- extends AbstractListeningFlushPolicy
Simple flush policy that will empty whole cache in case of updates.
- Version:
- $Revision: $ ($Author: $)
- Author:
- gjoseph
Method Summary |
protected void |
handleSingleEvent(Cache cache,
String repository,
javax.jcr.observation.Event event)
Implement this method to react on each and every event on a given cache and repository,
even if multiple where buffered. |
protected void |
postHandleEvents(Cache cache,
String repository)
Implement this method to wrap up flushing process after all single events have been processed. |
protected boolean |
preHandleEvents(Cache cache,
String repository)
Implement this method to react on buffered events on a given cache and repository. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FlushAllListeningPolicy
public FlushAllListeningPolicy()
preHandleEvents
protected boolean preHandleEvents(Cache cache,
String repository)
- Description copied from class:
AbstractListeningFlushPolicy
- Implement this method to react on buffered events on a given cache and repository.
- Specified by:
preHandleEvents
in class AbstractListeningFlushPolicy
- Returns:
- true if single events should be processed as well, false otherwise.
handleSingleEvent
protected void handleSingleEvent(Cache cache,
String repository,
javax.jcr.observation.Event event)
- Description copied from class:
AbstractListeningFlushPolicy
- Implement this method to react on each and every event on a given cache and repository,
even if multiple where buffered.
This method will be invoked only if
AbstractListeningFlushPolicy.preHandleEvents(Cache, String)
returns true;
- Specified by:
handleSingleEvent
in class AbstractListeningFlushPolicy
postHandleEvents
protected void postHandleEvents(Cache cache,
String repository)
- Description copied from class:
AbstractListeningFlushPolicy
- Implement this method to wrap up flushing process after all single events have been processed.
This method will be invoked only if
AbstractListeningFlushPolicy.preHandleEvents(Cache, String)
returns true;
- Specified by:
postHandleEvents
in class AbstractListeningFlushPolicy
Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.