|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.module.cache.AbstractListeningFlushPolicy
public abstract class AbstractListeningFlushPolicy
Implemenation of the FlushPolicy
providing functionality for triggering flush operation based on changes in observed repositories.
Nested Class Summary | |
---|---|
protected class |
AbstractListeningFlushPolicy.CacheCleaner
Event listener triggering the cleanup of the cache. |
Constructor Summary | |
---|---|
AbstractListeningFlushPolicy()
|
Method Summary | |
---|---|
void |
addRepository(String repository)
|
protected void |
flushByUUID(String uuid,
String repository,
Cache cache)
Flushes all content related to given uuid&repository combination from provided cache. |
List |
getRepositories()
The repositories to which the listener is attached - upon any event on these, the cache is cleared. |
protected abstract 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 abstract void |
postHandleEvents(Cache cache,
String repository)
Implement this method to wrap up flushing process after all single events have been processed. |
protected abstract boolean |
preHandleEvents(Cache cache,
String repository)
Implement this method to react on buffered events on a given cache and repository. |
void |
setRepositories(List repositories)
|
void |
start(Cache cache)
|
void |
stop(Cache cache)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractListeningFlushPolicy()
Method Detail |
---|
public List getRepositories()
public void setRepositories(List repositories)
public void addRepository(String repository)
public void start(Cache cache)
start
in interface FlushPolicy
public void stop(Cache cache)
stop
in interface FlushPolicy
protected abstract boolean preHandleEvents(Cache cache, String repository)
protected abstract void postHandleEvents(Cache cache, String repository)
preHandleEvents(Cache, String)
returns true;
protected abstract void handleSingleEvent(Cache cache, String repository, javax.jcr.observation.Event event)
preHandleEvents(Cache, String)
returns true;
protected void flushByUUID(String uuid, String repository, Cache cache)
uuid
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |