Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
CacheLIRS.Builder<K,V> |
averageWeight(int averageWeight)
Set the average weight of an entry.
|
CacheLIRS<K,V> |
build() |
CacheLIRS<K,V> |
build(com.google.common.cache.CacheLoader<K,V> cacheLoader) |
CacheLIRS.Builder<K,V> |
evictionCallback(CacheLIRS.EvictionCallback<K,V> evicted) |
CacheLIRS.Builder<K,V> |
maximumSize(long maxSize)
Set the maximum size (in number of entries).
|
CacheLIRS.Builder<K,V> |
maximumWeight(long maxWeight)
Set the total maximum weight.
|
CacheLIRS.Builder<K,V> |
module(java.lang.String module) |
CacheLIRS.Builder<K,V> |
recordStats() |
CacheLIRS.Builder<K,V> |
segmentCount(int segmentCount) |
CacheLIRS.Builder<K,V> |
stackMoveDistance(int stackMoveDistance)
How many other item are to be moved to the top of the stack before
the current item is moved.
|
CacheLIRS.Builder<K,V> |
weigher(com.google.common.cache.Weigher<K,V> weigher)
Set the weigher which is used if memory usage of an entry is not
explicitly set (when adding entries).
|
public CacheLIRS.Builder<K,V> recordStats()
public CacheLIRS.Builder<K,V> module(java.lang.String module)
public CacheLIRS.Builder<K,V> weigher(com.google.common.cache.Weigher<K,V> weigher)
weigher
- the weigherpublic CacheLIRS.Builder<K,V> maximumWeight(long maxWeight)
maxWeight
- the maximum weightpublic CacheLIRS.Builder<K,V> averageWeight(int averageWeight)
averageWeight
- the average weightpublic CacheLIRS.Builder<K,V> maximumSize(long maxSize)
maxSize
- the maximum sizepublic CacheLIRS.Builder<K,V> segmentCount(int segmentCount)
public CacheLIRS.Builder<K,V> stackMoveDistance(int stackMoveDistance)
public CacheLIRS.Builder<K,V> evictionCallback(CacheLIRS.EvictionCallback<K,V> evicted)
Copyright © 2010 - 2020 Adobe. All Rights Reserved