Class AsyncClaimingCacheImplGuava<K,V>

java.lang.Object
org.apache.jena.sparql.service.enhancer.claimingcache.AsyncClaimingCacheImplGuava<K,V>
Type Parameters:
K - The key type
V - The value type
All Implemented Interfaces:
AsyncClaimingCache<K,V>

public class AsyncClaimingCacheImplGuava<K,V> extends Object implements AsyncClaimingCache<K,V>
Implementation of async claiming cache. Claimed entries will never be evicted. Conversely, unclaimed items remain are added to a cache such that timely re-claiming will be fast. Use cases:
  • Resource sharing: Ensure that the same resource is handed to all clients requesting one by key.
  • Resource pooling: Claimed resources will never be closed, but unclaimed resources (e.g. something backed by an input stream) may remain on standby for a while.
Another way to view this class is as a mix of a map with weak values and a cache.