@ParametersAreNonnullByDefault public interface CacheCompatibilityLayer<K,V> extends com.atlassian.vcache.LocalCacheOperations<K,V>
This WILL be removed once all atlassian caches have been converted to vcache.
Modifier and Type | Method and Description |
---|---|
static <K,V> CacheCompatibilityLayer<K,V> |
of(com.atlassian.cache.Cache<K,V> cache)
Creates single value cache wrapper over
Cache . |
static <K,V> CacheCompatibilityLayer<K,V> |
of(com.atlassian.vcache.LocalCacheOperations<K,V> cache)
Creates single value cache wrapper over
LocalCacheOperations . |
static <K,V> CacheCompatibilityLayer<K,V> |
of(com.atlassian.vcache.LocalCacheOperations<K,V> cache,
Optional<java.util.function.Supplier<V>> supplier)
Creates single value cache wrapper over
LocalCacheOperations . |
static <K,V> CacheCompatibilityLayer<K,V> of(com.atlassian.vcache.LocalCacheOperations<K,V> cache, Optional<java.util.function.Supplier<V>> supplier)
LocalCacheOperations
.cache
- that would used as a backend. It should not be used directly by anything else.supplier
- used to generate the value, if one does not exist already for the key. The supplier may not
return null
.CacheCompatibilityLayer
backed by a supplied cache.static <K,V> CacheCompatibilityLayer<K,V> of(com.atlassian.vcache.LocalCacheOperations<K,V> cache)
LocalCacheOperations
.cache
- that would used as a backend. It should not be used directly by anything else.CacheCompatibilityLayer
backed by a supplied cache.static <K,V> CacheCompatibilityLayer<K,V> of(com.atlassian.cache.Cache<K,V> cache)
Cache
.cache
- that would used as a backend. It should not be used directly by anything else.Cache
backed by a supplied cache.Copyright © 2002-2016 Atlassian. All Rights Reserved.