@ParametersAreNonnullByDefault public class ConfluenceCachingBandanaPersister extends Object implements com.atlassian.bandana.BandanaPersister
Uses the read-through cache factory for non-transactional updates to the cache when data is read from the underlying persister.
| Constructor and Description |
|---|
ConfluenceCachingBandanaPersister(com.atlassian.bandana.BandanaPersister persister,
com.atlassian.vcache.VCacheFactory cacheFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
flushCaches() |
void |
remove(com.atlassian.bandana.BandanaContext context) |
void |
remove(com.atlassian.bandana.BandanaContext context,
String key) |
Map<String,Object> |
retrieve(com.atlassian.bandana.BandanaContext context)
This implementation is extremely processor intensive but correct.
|
@Nullable Object |
retrieve(com.atlassian.bandana.BandanaContext context,
String key)
Retrieves the value associated with the key from the given context.
|
Iterable<String> |
retrieveKeys(com.atlassian.bandana.BandanaContext bandanaContext)
Bypass the cache
|
void |
store(com.atlassian.bandana.BandanaContext context,
String key,
@Nullable Object value) |
public ConfluenceCachingBandanaPersister(com.atlassian.bandana.BandanaPersister persister,
com.atlassian.vcache.VCacheFactory cacheFactory)
public @Nullable Object retrieve(com.atlassian.bandana.BandanaContext context, String key)
Assumes that any BandanaContext we are passed is a KeyedBandanaContext because that's how Confluence uses Bandana.
retrieve in interface com.atlassian.bandana.BandanaPersisterpublic Map<String,Object> retrieve(com.atlassian.bandana.BandanaContext context)
public Iterable<String> retrieveKeys(com.atlassian.bandana.BandanaContext bandanaContext)
retrieveKeys in interface com.atlassian.bandana.BandanaPersisterbandanaContext - the context for which to get keyspublic void store(com.atlassian.bandana.BandanaContext context,
String key,
@Nullable Object value)
store in interface com.atlassian.bandana.BandanaPersisterpublic void flushCaches()
flushCaches in interface com.atlassian.bandana.BandanaPersisterpublic void remove(com.atlassian.bandana.BandanaContext context)
remove in interface com.atlassian.bandana.BandanaPersisterpublic void remove(com.atlassian.bandana.BandanaContext context,
String key)
remove in interface com.atlassian.bandana.BandanaPersisterCopyright © 2003–2020 Atlassian. All rights reserved.