com.atlassian.confluence.setup.bandana
Class ConfluenceCachingBandanaPersister
java.lang.Object
com.atlassian.confluence.setup.bandana.ConfluenceCachingBandanaPersister
- All Implemented Interfaces:
- BandanaPersister, EventListener
- public class ConfluenceCachingBandanaPersister
- extends Object
- implements BandanaPersister, EventListener
Caching bandana persister that uses inline caching.
Uses the read-through cache factory for non-transactional updates to the
cache when data is read from the underlying persister.
Field Summary |
static org.apache.log4j.Category |
log
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
public static final org.apache.log4j.Category log
ConfluenceCachingBandanaPersister
public ConfluenceCachingBandanaPersister()
setReadThroughCacheFactory
public void setReadThroughCacheFactory(ReadThroughCacheFactory readThroughCacheFactory)
setPersister
public void setPersister(BandanaPersister persister)
setCacheFactory
public void setCacheFactory(CacheFactory cacheFactory)
handleEvent
public void handleEvent(Event event)
- Flush caches when certain changes occur.
- Specified by:
handleEvent
in interface EventListener
- See Also:
getHandledEventClasses()
getHandledEventClasses
public Class[] getHandledEventClasses()
- This class handles plugin events in order to flush the Bandana caches
when a plugin is installed or uninstalled. Plugins can put plugin-specific
classes in the Bandana cache, and deserializing them when the plugin is
no longer installed will break the cache.
Configuration data store changes also result in a flush to make sure
the most up-to-date data is being accessed.
- Specified by:
getHandledEventClasses
in interface EventListener
- See Also:
handleEvent(Event)
retrieve
public Object retrieve(BandanaContext context,
String key)
- Retrieves the value associated with the key from the given context. If
the context does not exist, or the key is not found in the context, this
method returns null.
- Specified by:
retrieve
in interface BandanaPersister
retrieve
public Map retrieve(BandanaContext context)
- Specified by:
retrieve
in interface BandanaPersister
store
public void store(BandanaContext context,
String key,
Object value)
- Specified by:
store
in interface BandanaPersister
flushCaches
public void flushCaches()
- Specified by:
flushCaches
in interface BandanaPersister
remove
public void remove(BandanaContext context)
- Specified by:
remove
in interface BandanaPersister
remove
public void remove(BandanaContext context,
String key)
- Specified by:
remove
in interface BandanaPersister