Class LocalCacheFactory.SSLiMW<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- com.github.benmanes.caffeine.cache.BLCHeader.PadDrainStatus<K,V>
-
- com.github.benmanes.caffeine.cache.BLCHeader.DrainStatusRef<K,V>
-
- com.github.benmanes.caffeine.cache.BoundedLocalCache<K,V>
-
- com.github.benmanes.caffeine.cache.LocalCacheFactory.SS<K,V>
-
- com.github.benmanes.caffeine.cache.LocalCacheFactory.SSLi<K,V>
-
- com.github.benmanes.caffeine.cache.LocalCacheFactory.SSLiMW<K,V>
-
- All Implemented Interfaces:
LocalCache<K,V>
,java.util.concurrent.ConcurrentMap<K,V>
,java.util.Map<K,V>
- Direct Known Subclasses:
LocalCacheFactory.SSLiMWA
,LocalCacheFactory.SSLiMWR
,LocalCacheFactory.SSLiMWW
- Enclosing class:
- LocalCacheFactory
static class LocalCacheFactory.SSLiMW<K,V> extends LocalCacheFactory.SSLi<K,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.benmanes.caffeine.cache.BoundedLocalCache
BoundedLocalCache.AddTask, BoundedLocalCache.BoundedLocalAsyncLoadingCache<K,V>, BoundedLocalCache.BoundedLocalLoadingCache<K,V>, BoundedLocalCache.BoundedLocalManualCache<K,V>, BoundedLocalCache.BoundedPolicy<K,V>, BoundedLocalCache.EntryIterator<K,V>, BoundedLocalCache.EntrySetView<K,V>, BoundedLocalCache.EntrySpliterator<K,V>, BoundedLocalCache.KeyIterator<K,V>, BoundedLocalCache.KeySetView<K,V>, BoundedLocalCache.KeySpliterator<K,V>, BoundedLocalCache.PerformCleanupTask, BoundedLocalCache.RemovalTask, BoundedLocalCache.UpdateTask, BoundedLocalCache.ValueIterator<K,V>, BoundedLocalCache.ValueSpliterator<K,V>, BoundedLocalCache.ValuesView<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description private AccessOrderDeque<Node<K,V>>
accessOrderEdenDeque
private AccessOrderDeque<Node<K,V>>
accessOrderProbationDeque
private AccessOrderDeque<Node<K,V>>
accessOrderProtectedDeque
protected static long
EDEN_MAXIMUM_OFFSET
protected static long
EDEN_WEIGHTED_SIZE_OFFSET
private long
edenMaximum
private long
edenWeightedSize
protected static long
MAIN_PROTECTED_MAXIMUM_OFFSET
protected static long
MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET
private long
mainProtectedMaximum
private long
mainProtectedWeightedSize
private long
maximum
protected static long
MAXIMUM_OFFSET
private FrequencySketch<K>
sketch
protected static long
WEIGHTED_SIZE_OFFSET
private long
weightedSize
private MpscGrowableArrayQueue<java.lang.Runnable>
writeBuffer
-
Fields inherited from class com.github.benmanes.caffeine.cache.BoundedLocalCache
accessPolicy, cacheLoader, data, drainBuffersTask, entrySet, evictionLock, executor, EXPIRE_WRITE_TOLERANCE, isAsync, keySet, logger, MAXIMUM_CAPACITY, NCPU, nodeFactory, PERCENT_MAIN, PERCENT_MAIN_PROTECTED, readBuffer, values, weigher, WRITE_BUFFER_MAX, WRITE_BUFFER_MIN, WRITE_BUFFER_RETRIES, writer
-
Fields inherited from class com.github.benmanes.caffeine.cache.BLCHeader.DrainStatusRef
DRAIN_STATUS_OFFSET, drainStatus, IDLE, PROCESSING_TO_IDLE, PROCESSING_TO_REQUIRED, REQUIRED
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AccessOrderDeque<Node<K,V>>
accessOrderEdenDeque()
protected AccessOrderDeque<Node<K,V>>
accessOrderProbationDeque()
protected AccessOrderDeque<Node<K,V>>
accessOrderProtectedDeque()
protected boolean
buffersWrites()
If the page replacement policy buffers writes.protected long
edenMaximum()
Returns the maximum weighted size of the eden space.protected long
edenWeightedSize()
Returns the uncorrected combined weight of the values in the eden space.protected boolean
evicts()
Returns if the cache evicts entries due to a maximum size or weight threshold.protected boolean
fastpath()
Returns if an access to an entry can skip notifying the eviction policy.protected FrequencySketch<K>
frequencySketch()
protected void
lazySetEdenMaximum(long edenMaximum)
protected void
lazySetEdenWeightedSize(long edenWeightedSize)
protected void
lazySetMainProtectedMaximum(long mainProtectedMaximum)
protected void
lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize)
protected void
lazySetMaximum(long maximum)
protected void
lazySetWeightedSize(long weightedSize)
protected long
mainProtectedMaximum()
Returns the maximum weighted size of the main's protected space.protected long
mainProtectedWeightedSize()
Returns the uncorrected combined weight of the values in the main's protected space.protected long
maximum()
Returns the maximum weighted size.protected long
weightedSize()
Returns the uncorrected combined weight of the values in the cache.protected MpscGrowableArrayQueue<java.lang.Runnable>
writeBuffer()
-
Methods inherited from class com.github.benmanes.caffeine.cache.LocalCacheFactory.SSLi
hasRemovalListener, removalListener
-
Methods inherited from class com.github.benmanes.caffeine.cache.BoundedLocalCache
adjustedWeightedSize, admit, afterRead, afterWrite, ceilingPowerOfTwo, cleanUp, clear, collectKeys, collectValues, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, doComputeIfAbsent, drainKeyReferences, drainReadBuffer, drainValueReferences, drainWriteBuffer, entrySet, estimatedSize, evictEntries, evictEntry, evictFromEden, evictFromMain, evictionOrder, executor, expirationTicker, expireAfterAccessEntries, expireAfterAccessEntries, expireAfterAcessOrder, expireAfterWriteEntries, expireAfterWriteOrder, expireEntries, expiresAfterAccess, expiresAfterAccessNanos, expiresAfterWrite, expiresAfterWriteNanos, get, getAllPresent, getIfPresent, getIfPresentQuietly, hasExpired, hasWriter, hasWriteTime, isComputingAsync, isEmpty, isRecordingStats, isWeighted, keyReferenceQueue, keySet, maintenance, makeDead, makeSerializationProxy, merge, notifyRemoval, onAccess, performCleanUp, put, put, putFast, putIfAbsent, putSlow, refreshAfterWrite, refreshAfterWriteNanos, refreshIfNeeded, remap, remove, remove, removeNode, removeNodes, removeNoWriter, removeWithWriter, reorder, reorderProbation, replace, replace, replaceAll, scheduleAfterWrite, scheduleDrainBuffers, setExpiresAfterAccessNanos, setExpiresAfterWriteNanos, setMaximum, setRefreshAfterWriteNanos, size, skipReadBuffer, snapshot, statsCounter, statsTicker, valueReferenceQueue, values, writeOrderDeque
-
Methods inherited from class com.github.benmanes.caffeine.cache.BLCHeader.DrainStatusRef
casDrainStatus, drainStatus, lazySetDrainStatus, shouldDrainBuffers
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.benmanes.caffeine.cache.LocalCache
compute, computeIfAbsent, invalidateAll, statsAware, statsAware, statsAware
-
-
-
-
Field Detail
-
MAXIMUM_OFFSET
protected static final long MAXIMUM_OFFSET
-
EDEN_MAXIMUM_OFFSET
protected static final long EDEN_MAXIMUM_OFFSET
-
MAIN_PROTECTED_MAXIMUM_OFFSET
protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET
-
WEIGHTED_SIZE_OFFSET
protected static final long WEIGHTED_SIZE_OFFSET
-
EDEN_WEIGHTED_SIZE_OFFSET
protected static final long EDEN_WEIGHTED_SIZE_OFFSET
-
MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET
protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET
-
maximum
private volatile long maximum
-
edenMaximum
private volatile long edenMaximum
-
mainProtectedMaximum
private volatile long mainProtectedMaximum
-
weightedSize
private volatile long weightedSize
-
edenWeightedSize
private volatile long edenWeightedSize
-
mainProtectedWeightedSize
private volatile long mainProtectedWeightedSize
-
sketch
private final FrequencySketch<K> sketch
-
accessOrderEdenDeque
private final AccessOrderDeque<Node<K,V>> accessOrderEdenDeque
-
accessOrderProbationDeque
private final AccessOrderDeque<Node<K,V>> accessOrderProbationDeque
-
accessOrderProtectedDeque
private final AccessOrderDeque<Node<K,V>> accessOrderProtectedDeque
-
writeBuffer
private final MpscGrowableArrayQueue<java.lang.Runnable> writeBuffer
-
-
Method Detail
-
evicts
protected final boolean evicts()
Description copied from class:BoundedLocalCache
Returns if the cache evicts entries due to a maximum size or weight threshold.- Overrides:
evicts
in classBoundedLocalCache<K,V>
-
maximum
protected final long maximum()
Description copied from class:BoundedLocalCache
Returns the maximum weighted size.- Overrides:
maximum
in classBoundedLocalCache<K,V>
-
lazySetMaximum
protected final void lazySetMaximum(long maximum)
- Overrides:
lazySetMaximum
in classBoundedLocalCache<K,V>
-
edenMaximum
protected final long edenMaximum()
Description copied from class:BoundedLocalCache
Returns the maximum weighted size of the eden space.- Overrides:
edenMaximum
in classBoundedLocalCache<K,V>
-
lazySetEdenMaximum
protected final void lazySetEdenMaximum(long edenMaximum)
- Overrides:
lazySetEdenMaximum
in classBoundedLocalCache<K,V>
-
mainProtectedMaximum
protected final long mainProtectedMaximum()
Description copied from class:BoundedLocalCache
Returns the maximum weighted size of the main's protected space.- Overrides:
mainProtectedMaximum
in classBoundedLocalCache<K,V>
-
lazySetMainProtectedMaximum
protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum)
- Overrides:
lazySetMainProtectedMaximum
in classBoundedLocalCache<K,V>
-
weightedSize
protected final long weightedSize()
Description copied from class:BoundedLocalCache
Returns the uncorrected combined weight of the values in the cache.- Overrides:
weightedSize
in classBoundedLocalCache<K,V>
-
lazySetWeightedSize
protected final void lazySetWeightedSize(long weightedSize)
- Overrides:
lazySetWeightedSize
in classBoundedLocalCache<K,V>
-
edenWeightedSize
protected final long edenWeightedSize()
Description copied from class:BoundedLocalCache
Returns the uncorrected combined weight of the values in the eden space.- Overrides:
edenWeightedSize
in classBoundedLocalCache<K,V>
-
lazySetEdenWeightedSize
protected final void lazySetEdenWeightedSize(long edenWeightedSize)
- Overrides:
lazySetEdenWeightedSize
in classBoundedLocalCache<K,V>
-
mainProtectedWeightedSize
protected final long mainProtectedWeightedSize()
Description copied from class:BoundedLocalCache
Returns the uncorrected combined weight of the values in the main's protected space.- Overrides:
mainProtectedWeightedSize
in classBoundedLocalCache<K,V>
-
lazySetMainProtectedWeightedSize
protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize)
- Overrides:
lazySetMainProtectedWeightedSize
in classBoundedLocalCache<K,V>
-
frequencySketch
protected final FrequencySketch<K> frequencySketch()
- Overrides:
frequencySketch
in classBoundedLocalCache<K,V>
-
fastpath
protected boolean fastpath()
Description copied from class:BoundedLocalCache
Returns if an access to an entry can skip notifying the eviction policy.- Overrides:
fastpath
in classBoundedLocalCache<K,V>
-
accessOrderEdenDeque
protected final AccessOrderDeque<Node<K,V>> accessOrderEdenDeque()
- Overrides:
accessOrderEdenDeque
in classBoundedLocalCache<K,V>
-
accessOrderProbationDeque
protected final AccessOrderDeque<Node<K,V>> accessOrderProbationDeque()
- Overrides:
accessOrderProbationDeque
in classBoundedLocalCache<K,V>
-
accessOrderProtectedDeque
protected final AccessOrderDeque<Node<K,V>> accessOrderProtectedDeque()
- Overrides:
accessOrderProtectedDeque
in classBoundedLocalCache<K,V>
-
writeBuffer
protected final MpscGrowableArrayQueue<java.lang.Runnable> writeBuffer()
- Overrides:
writeBuffer
in classBoundedLocalCache<K,V>
-
buffersWrites
protected final boolean buffersWrites()
Description copied from class:BoundedLocalCache
If the page replacement policy buffers writes.- Overrides:
buffersWrites
in classBoundedLocalCache<K,V>
-
-