Class AsyncClaimingCacheWithTransformValue<K,V1,V2>
java.lang.Object
org.aksw.commons.cache.async.AsyncClaimingCacheWithTransformValue<K,V1,V2>
- All Implemented Interfaces:
AsyncClaimingCache<K,V2>
public class AsyncClaimingCacheWithTransformValue<K,V1,V2>
extends Object
implements AsyncClaimingCache<K,V2>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAsyncClaimingCacheWithTransformValue(AsyncClaimingCache<K, V1> delegate, Function<? super V1, ? extends V2> transform) -
Method Summary
Modifier and TypeMethodDescriptionaddEvictionGuard(Predicate<? super K> predicate) Protect eviction of certain keys as long as the guard is not disposed.Claim a reference to the key's entry.claimIfPresent(K key) Cannot raise an ExecutionException because it does not trigger loadingstatic <K,V1, V2> AsyncClaimingCache <K, V2> create(AsyncClaimingCache<K, V1> delegate, Function<? super V1, ? extends V2> transform) void
-
Field Details
-
delegate
-
transform
-
-
Constructor Details
-
AsyncClaimingCacheWithTransformValue
-
-
Method Details
-
create
public static <K,V1, AsyncClaimingCache<K,V2> V2> create(AsyncClaimingCache<K, V1> delegate, Function<? super V1, ? extends V2> transform) -
claim
Description copied from interface:AsyncClaimingCacheClaim a reference to the key's entry.- Specified by:
claimin interfaceAsyncClaimingCache<K,V1> - Parameters:
key-- Returns:
-
claimIfPresent
Description copied from interface:AsyncClaimingCacheCannot raise an ExecutionException because it does not trigger loading- Specified by:
claimIfPresentin interfaceAsyncClaimingCache<K,V1>
-
invalidateAll
public void invalidateAll()- Specified by:
invalidateAllin interfaceAsyncClaimingCache<K,V1>
-
addEvictionGuard
Description copied from interface:AsyncClaimingCacheProtect eviction of certain keys as long as the guard is not disposed. Disposable may immediately evict all no longer guarded items- Specified by:
addEvictionGuardin interfaceAsyncClaimingCache<K,V1>
-