Class AbstractPersistentConcurrentOffHeapCache<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap<K,V>
org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapCache<K,V>
org.terracotta.offheapstore.disk.persistent.AbstractPersistentConcurrentOffHeapCache<K,V>
- All Implemented Interfaces:
ConcurrentMap<K,,V> Map<K,,V> ConcurrentMapInternals,Persistent,HashingMap<K,,V> MapInternals,PinnableCache<K,V>
- Direct Known Subclasses:
PersistentConcurrentOffHeapClockCache
public class AbstractPersistentConcurrentOffHeapCache<K,V>
extends AbstractConcurrentOffHeapCache<K,V>
implements Persistent
-
Nested Class Summary
Nested classes/interfaces inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap
AbstractConcurrentOffHeapMap.AggregateIterator<T>Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
FieldsFields inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap
segments -
Constructor Summary
ConstructorsConstructorDescriptionAbstractPersistentConcurrentOffHeapCache(Factory<? extends PinnableSegment<K, V>> segmentFactory) Create a concurrent map using a default number of segments.AbstractPersistentConcurrentOffHeapCache(Factory<? extends PinnableSegment<K, V>> segmentFactory, int concurrency) Create a concurrent map with a defined number of segments. -
Method Summary
Modifier and TypeMethodDescriptionvoidbootstrap(ObjectInput input) voidclose()voidflush()voidpersist(ObjectOutput output) protected static intreadSegmentCount(ObjectInput input) Methods inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapCache
fill, getAndPin, isPinned, putPinned, segmentFor, setPinning, shrink, shrinkOthersMethods inherited from class org.terracotta.offheapstore.concurrent.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 class java.util.AbstractMap
clone, equals, hashCode, isEmpty, putAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
MAGIC
private static final int MAGIC- See Also:
-
-
Constructor Details
-
AbstractPersistentConcurrentOffHeapCache
public AbstractPersistentConcurrentOffHeapCache(Factory<? extends PinnableSegment<K, V>> segmentFactory) Create a concurrent map using a default number of segments.- Parameters:
segmentFactory- factory used to create the map segments
-
AbstractPersistentConcurrentOffHeapCache
public AbstractPersistentConcurrentOffHeapCache(Factory<? extends PinnableSegment<K, V>> segmentFactory, int concurrency) Create a concurrent map with a defined number of segments.- Parameters:
segmentFactory- factory used to create the map segmentsconcurrency- number of segments in the map- Throws:
IllegalArgumentException- if the supplied number of segments is negative
-
-
Method Details
-
flush
- Specified by:
flushin interfacePersistent- Throws:
IOException
-
persist
- Specified by:
persistin interfacePersistent- Throws:
IOException
-
close
- Specified by:
closein interfacePersistent- Throws:
IOException
-
bootstrap
- Specified by:
bootstrapin interfacePersistent- Throws:
IOException
-
readSegmentCount
- Throws:
IOException
-