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>>accessOrderEdenDequeprivate AccessOrderDeque<Node<K,V>>accessOrderProbationDequeprivate AccessOrderDeque<Node<K,V>>accessOrderProtectedDequeprotected static longEDEN_MAXIMUM_OFFSETprotected static longEDEN_WEIGHTED_SIZE_OFFSETprivate longedenMaximumprivate longedenWeightedSizeprotected static longMAIN_PROTECTED_MAXIMUM_OFFSETprotected static longMAIN_PROTECTED_WEIGHTED_SIZE_OFFSETprivate longmainProtectedMaximumprivate longmainProtectedWeightedSizeprivate longmaximumprotected static longMAXIMUM_OFFSETprivate FrequencySketch<K>sketchprotected static longWEIGHTED_SIZE_OFFSETprivate longweightedSizeprivate 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 booleanbuffersWrites()If the page replacement policy buffers writes.protected longedenMaximum()Returns the maximum weighted size of the eden space.protected longedenWeightedSize()Returns the uncorrected combined weight of the values in the eden space.protected booleanevicts()Returns if the cache evicts entries due to a maximum size or weight threshold.protected booleanfastpath()Returns if an access to an entry can skip notifying the eviction policy.protected FrequencySketch<K>frequencySketch()protected voidlazySetEdenMaximum(long edenMaximum)protected voidlazySetEdenWeightedSize(long edenWeightedSize)protected voidlazySetMainProtectedMaximum(long mainProtectedMaximum)protected voidlazySetMainProtectedWeightedSize(long mainProtectedWeightedSize)protected voidlazySetMaximum(long maximum)protected voidlazySetWeightedSize(long weightedSize)protected longmainProtectedMaximum()Returns the maximum weighted size of the main's protected space.protected longmainProtectedWeightedSize()Returns the uncorrected combined weight of the values in the main's protected space.protected longmaximum()Returns the maximum weighted size.protected longweightedSize()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:BoundedLocalCacheReturns if the cache evicts entries due to a maximum size or weight threshold.- Overrides:
evictsin classBoundedLocalCache<K,V>
-
maximum
protected final long maximum()
Description copied from class:BoundedLocalCacheReturns the maximum weighted size.- Overrides:
maximumin classBoundedLocalCache<K,V>
-
lazySetMaximum
protected final void lazySetMaximum(long maximum)
- Overrides:
lazySetMaximumin classBoundedLocalCache<K,V>
-
edenMaximum
protected final long edenMaximum()
Description copied from class:BoundedLocalCacheReturns the maximum weighted size of the eden space.- Overrides:
edenMaximumin classBoundedLocalCache<K,V>
-
lazySetEdenMaximum
protected final void lazySetEdenMaximum(long edenMaximum)
- Overrides:
lazySetEdenMaximumin classBoundedLocalCache<K,V>
-
mainProtectedMaximum
protected final long mainProtectedMaximum()
Description copied from class:BoundedLocalCacheReturns the maximum weighted size of the main's protected space.- Overrides:
mainProtectedMaximumin classBoundedLocalCache<K,V>
-
lazySetMainProtectedMaximum
protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum)
- Overrides:
lazySetMainProtectedMaximumin classBoundedLocalCache<K,V>
-
weightedSize
protected final long weightedSize()
Description copied from class:BoundedLocalCacheReturns the uncorrected combined weight of the values in the cache.- Overrides:
weightedSizein classBoundedLocalCache<K,V>
-
lazySetWeightedSize
protected final void lazySetWeightedSize(long weightedSize)
- Overrides:
lazySetWeightedSizein classBoundedLocalCache<K,V>
-
edenWeightedSize
protected final long edenWeightedSize()
Description copied from class:BoundedLocalCacheReturns the uncorrected combined weight of the values in the eden space.- Overrides:
edenWeightedSizein classBoundedLocalCache<K,V>
-
lazySetEdenWeightedSize
protected final void lazySetEdenWeightedSize(long edenWeightedSize)
- Overrides:
lazySetEdenWeightedSizein classBoundedLocalCache<K,V>
-
mainProtectedWeightedSize
protected final long mainProtectedWeightedSize()
Description copied from class:BoundedLocalCacheReturns the uncorrected combined weight of the values in the main's protected space.- Overrides:
mainProtectedWeightedSizein classBoundedLocalCache<K,V>
-
lazySetMainProtectedWeightedSize
protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize)
- Overrides:
lazySetMainProtectedWeightedSizein classBoundedLocalCache<K,V>
-
frequencySketch
protected final FrequencySketch<K> frequencySketch()
- Overrides:
frequencySketchin classBoundedLocalCache<K,V>
-
fastpath
protected boolean fastpath()
Description copied from class:BoundedLocalCacheReturns if an access to an entry can skip notifying the eviction policy.- Overrides:
fastpathin classBoundedLocalCache<K,V>
-
accessOrderEdenDeque
protected final AccessOrderDeque<Node<K,V>> accessOrderEdenDeque()
- Overrides:
accessOrderEdenDequein classBoundedLocalCache<K,V>
-
accessOrderProbationDeque
protected final AccessOrderDeque<Node<K,V>> accessOrderProbationDeque()
- Overrides:
accessOrderProbationDequein classBoundedLocalCache<K,V>
-
accessOrderProtectedDeque
protected final AccessOrderDeque<Node<K,V>> accessOrderProtectedDeque()
- Overrides:
accessOrderProtectedDequein classBoundedLocalCache<K,V>
-
writeBuffer
protected final MpscGrowableArrayQueue<java.lang.Runnable> writeBuffer()
- Overrides:
writeBufferin classBoundedLocalCache<K,V>
-
buffersWrites
protected final boolean buffersWrites()
Description copied from class:BoundedLocalCacheIf the page replacement policy buffers writes.- Overrides:
buffersWritesin classBoundedLocalCache<K,V>
-
-