@ParametersAreNonnullByDefault public class ReadThroughCachingBandanaPersister extends Object implements com.atlassian.bandana.BandanaPersister
BandanaPersister which caches the data from another BandanaPersister.| Modifier and Type | Method and Description |
|---|---|
static ReadThroughCachingBandanaPersister |
create(com.atlassian.bandana.BandanaPersister persister,
com.atlassian.cache.CacheFactory cacheFactory) |
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 static ReadThroughCachingBandanaPersister create(com.atlassian.bandana.BandanaPersister persister, com.atlassian.cache.CacheFactory 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–2022 Atlassian. All rights reserved.