com.atlassian.confluence.setup.bandana
Class ConfluenceCachingBandanaPersister
java.lang.Object
com.atlassian.confluence.setup.bandana.ConfluenceCachingBandanaPersister
- All Implemented Interfaces:
- BandanaPersister
public class ConfluenceCachingBandanaPersister
- extends Object
- implements BandanaPersister
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()
setCacheFactory
public void setCacheFactory(ReadThroughCacheFactory cacheFactory)
setPersister
public void setPersister(BandanaPersister persister)
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.
Assumes that any BandanaContext we are passed is a ConfluenceBandanaContext because that's how Confluence
uses Bandana.
- Specified by:
retrieve
in interface BandanaPersister
retrieve
public Map retrieve(BandanaContext context)
- This implementation is extremely processor intensive but correct. The assumption is that this method NEVER
gets called.
- Specified by:
retrieve
in interface BandanaPersister
- Parameters:
context
- context to retrieve content for.
- Returns:
- a Map from
String
key to Object
value
retrieveKeys
public Iterable<String> retrieveKeys(BandanaContext bandanaContext)
- Bypass the cache
- Specified by:
retrieveKeys
in interface BandanaPersister
- Parameters:
bandanaContext
- the context for which to get keys
- Returns:
- the keys for the given context
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