@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.BandanaPersister
public Map<String,Object> retrieve(com.atlassian.bandana.BandanaContext context)
public Iterable<String> retrieveKeys(com.atlassian.bandana.BandanaContext bandanaContext)
retrieveKeys
in interface com.atlassian.bandana.BandanaPersister
bandanaContext
- 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.BandanaPersister
public void flushCaches()
flushCaches
in interface com.atlassian.bandana.BandanaPersister
public void remove(com.atlassian.bandana.BandanaContext context)
remove
in interface com.atlassian.bandana.BandanaPersister
public void remove(com.atlassian.bandana.BandanaContext context, String key)
remove
in interface com.atlassian.bandana.BandanaPersister
Copyright © 2003–2023 Atlassian. All rights reserved.
View cookie preferences