Package io.github.xanthic.cache.api
Interface CacheProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface CacheProvider
Creates
Cache
instances using some backing implementation-
Method Summary
Modifier and Type Method Description <K, V> Cache<K,V>
build(ICacheSpec<K,V> spec)
Builds a newCache
instance according to the supplied specification
-
Method Details
-
build
Builds a newCache
instance according to the supplied specification- Type Parameters:
K
- The type of the keys that form the cacheV
- The type of the values that are contained in the cache- Parameters:
spec
- The cache specification that the new instance should be configured to satisfy- Returns:
- a new
Cache
instance that conforms with the supplied specification
-