Class CacheView<KF,KB,V>
java.lang.Object
org.aksw.commons.util.cache.CacheView<KF,KB,V>
- Type Parameters:
KF- The frontend key typeKB- The backend key typeV- The value type
- All Implemented Interfaces:
com.google.common.cache.Cache<KF,V>
A view over a cache which can place 'local' keys into a shared cache.
For example, local keys could be offsets in a file, whereas global keys
include the file name.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe delegate cacheA predicate that hides cache entries unrelated to this cache view. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasMap()voidcleanUp()getAllPresent(Iterable<? extends Object> keys) getIfPresent(Object key) voidinvalidate(Object key) voidvoidinvalidateAll(Iterable<? extends Object> keys) voidvoidprotected KBsafeToBackend(KF key) longsize()com.google.common.cache.CacheStatsstats()
-
Field Details
-
backend
-
keyConverter
-
backendKeyFilter
-
-
Constructor Details
-
CacheView
-
-
Method Details
-
getBackend
-
safeToBackend
-
convert
-
getIfPresent
-
get
- Specified by:
getin interfacecom.google.common.cache.Cache<KF,KB> - Throws:
ExecutionException
-
getAllPresent
-
put
-
putAll
-
invalidate
-
invalidateAll
-
invalidateAll
-
size
-
stats
-
asMap
-
cleanUp
-