org.terracotta.offheapstore.concurrent
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, MapInternals, PinnableCache<K,V>
- Direct Known Subclasses:
- AbstractPersistentConcurrentOffHeapCache, ConcurrentOffHeapClockCache, ConcurrentWriteLockedOffHeapClockCache
public abstract class AbstractConcurrentOffHeapCache<K,V>
- extends AbstractConcurrentOffHeapMap<K,V>
- implements PinnableCache<K,V>
- Author:
- cdennis
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
| Methods inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap |
clear, 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, removeNoReturn, replace, replace, segmentFor, size, values, writeLockAll, writeUnlockAll |
| Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
AbstractConcurrentOffHeapCache
public AbstractConcurrentOffHeapCache(Factory<? extends PinnableSegment<K,V>> segmentFactory)
AbstractConcurrentOffHeapCache
public AbstractConcurrentOffHeapCache(Factory<? extends Segment<K,V>> segmentFactory,
int concurrency)
fill
public V fill(K key,
V value)
- Description copied from class:
AbstractConcurrentOffHeapMap
- See
OffHeapHashMap.fill(Object, Object) for a detailed description.
- Overrides:
fill in class AbstractConcurrentOffHeapMap<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
public V getAndPin(K key)
- Specified by:
getAndPin in interface PinnableCache<K,V>
putPinned
public V putPinned(K key,
V value)
- Specified by:
putPinned in interface PinnableCache<K,V>
isPinned
public boolean isPinned(Object key)
- Specified by:
isPinned in interface PinnableCache<K,V>
setPinning
public void setPinning(K key,
boolean pinned)
- Specified by:
setPinning in interface PinnableCache<K,V>
segmentFor
protected PinnableSegment<K,V> segmentFor(Object key)
- Overrides:
segmentFor in class AbstractConcurrentOffHeapMap<K,V>
shrink
public boolean shrink()
shrinkOthers
public boolean shrinkOthers(int excludedHash)
Copyright © 2015. All Rights Reserved.