Class AbstractConcurrentOffHeapCache<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap<K,V>
org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapCache<K,V>
- All Implemented Interfaces:
ConcurrentMap<K,V>, Map<K, V>, ConcurrentMapInternals, HashingMap<K, V>, MapInternals, PinnableCache<K, V>
- Direct Known Subclasses:
AbstractPersistentConcurrentOffHeapCache, ConcurrentOffHeapClockCache, ConcurrentWriteLockedOffHeapClockCache
public abstract class AbstractConcurrentOffHeapCache<K,V>
extends AbstractConcurrentOffHeapMap<K,V>
implements PinnableCache<K,V>
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractConcurrentOffHeapMap
AbstractConcurrentOffHeapMap.AggregatedValuesCollection, AbstractConcurrentOffHeapMap.AggregateEntrySet, AbstractConcurrentOffHeapMap.AggregateIterator<T>, AbstractConcurrentOffHeapMap.AggregateKeySetNested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
FieldsFields inherited from class AbstractConcurrentOffHeapMap
segments -
Constructor Summary
ConstructorsConstructorDescriptionAbstractConcurrentOffHeapCache(Factory<? extends PinnableSegment<K, V>> segmentFactory) AbstractConcurrentOffHeapCache(Factory<? extends Segment<K, V>> segmentFactory, int concurrency) -
Method Summary
Modifier and TypeMethodDescriptionSeeOffHeapHashMap.fill(Object, Object)for a detailed description.booleanprotected PinnableSegment<K, V> segmentFor(Object key) voidsetPinning(K key, boolean pinned) booleanshrink()booleanshrinkOthers(int excludedHash) Methods inherited from class AbstractConcurrentOffHeapMap
clear, computeIfAbsentWithMetadata, computeIfPresentWithMetadata, computeWithMetadata, containsKey, containsValue, destroy, entrySet, fill, get, getAllocatedMemory, getAndSetMetadata, getConcurrency, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getIndexFor, getMetadata, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSegmentInternals, getSegments, getSize, getTableCapacity, getUsedSlotCount, getValueAndSetMetadata, getVitalMemory, handleOversizeMappingException, keySet, put, put, putIfAbsent, readLockAll, readUnlockAll, remove, remove, removeAllWithHash, removeNoReturn, replace, replace, segmentFor, size, values, writeLockAll, writeUnlockAllMethods inherited from interface ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
SIZE_COMPARATOR
-
-
Constructor Details
-
AbstractConcurrentOffHeapCache
-
AbstractConcurrentOffHeapCache
-
-
Method Details
-
fill
Description copied from class:AbstractConcurrentOffHeapMapSeeOffHeapHashMap.fill(Object, Object)for a detailed description.- Overrides:
fillin classAbstractConcurrentOffHeapMap<K,V> - Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- the previous value associated with key, or null if there was no mapping for key (irrespective of whether the value was successfully installed).
-
getAndPin
-
putPinned
-
isPinned
- Specified by:
isPinnedin interfacePinnableCache<K,V>
-
setPinning
- Specified by:
setPinningin interfacePinnableCache<K,V>
-
segmentFor
- Overrides:
segmentForin classAbstractConcurrentOffHeapMap<K,V>
-
shrink
public boolean shrink() -
shrinkOthers
public boolean shrinkOthers(int excludedHash)
-