public class

ConfluenceCachingBandanaPersister

extends Object
implements BandanaPersister
java.lang.Object
   ↳ com.atlassian.confluence.setup.bandana.ConfluenceCachingBandanaPersister

Class Overview

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.

Summary

Public Constructors
ConfluenceCachingBandanaPersister()
Public Methods
void flushCaches()
void remove(BandanaContext context, String key)
void remove(BandanaContext context)
Map<StringObject> retrieve(BandanaContext context)
This implementation is extremely processor intensive but correct.
Object retrieve(BandanaContext context, String key)
Retrieves the value associated with the key from the given context.
Iterable<String> retrieveKeys(BandanaContext bandanaContext)
Bypass the cache
void setCacheFactory(ReadThroughCacheFactory cacheFactory)
void setPersister(BandanaPersister persister)
void store(BandanaContext context, String key, Object value)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.bandana.BandanaPersister

Public Constructors

public ConfluenceCachingBandanaPersister ()

Public Methods

public void flushCaches ()

public void remove (BandanaContext context, String key)

public void remove (BandanaContext context)

public Map<StringObject> retrieve (BandanaContext context)

This implementation is extremely processor intensive but correct. The assumption is that this method NEVER gets called.

Parameters
context context to retrieve content for.
Returns

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 KeyedBandanaContext because that's how Confluence uses Bandana.

public Iterable<String> retrieveKeys (BandanaContext bandanaContext)

Bypass the cache

Parameters
bandanaContext the context for which to get keys
Returns
  • the keys for the given context

public void setCacheFactory (ReadThroughCacheFactory cacheFactory)

public void setPersister (BandanaPersister persister)

public void store (BandanaContext context, String key, Object value)