Type Parameters:
K -
V -
An extension of loading cache that allows for making explicit
references to cached entries such that they won't be evicted.
As long as an entry's reference is not released the cache entry will not be evicted.
Author:
raven
Field Summary
Fields
protected com.google.common.cache.Cache<com.google.common.collect.Range<C >,V >
protected com.google.common.collect.RangeSet<C >
protected com.google.common.collect.RangeMap<C ,Ref <V >>
Constructor Summary
Constructors
RangeCache (com.google.common.cache.CacheBuilder<com.google.common.collect.Range<C >,V > cacheBuilder)
Method Summary
All Methods Instance Methods Concrete Methods
com.google.common.collect.RangeMap<C ,Ref <V >>
claimAll (com.google.common.collect.Range<C > requestRange)
Claim all items in the given request range
void
put (com.google.common.collect.Range<C > key,
V value)
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
Field Details
cache
protected com.google.common.cache.Cache<com.google.common.collect.Range<C extends Comparable <C >>,V > cache
cacheKeys
protected com.google.common.collect.RangeSet<C extends Comparable <C >> cacheKeys
claimed
protected com.google.common.collect.RangeMap<C extends Comparable <C >,Ref <V >> claimed
Constructor Details
RangeCache
public RangeCache (com.google.common.cache.CacheBuilder<com.google.common.collect.Range<C >,V > cacheBuilder)
Method Details
put
public void put (com.google.common.collect.Range<C > key,
V value)
claimAll
public com.google.common.collect.RangeMap<C ,Ref <V >> claimAll (com.google.common.collect.Range<C > requestRange)
Claim all items in the given request range