Class AbstractPersistentConcurrentOffHeapMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap<K,V>
-
- org.terracotta.offheapstore.disk.persistent.AbstractPersistentConcurrentOffHeapMap<K,V>
-
- All Implemented Interfaces:
java.util.concurrent.ConcurrentMap<K,V>,java.util.Map<K,V>,ConcurrentMapInternals,Persistent,HashingMap<K,V>,MapInternals
- Direct Known Subclasses:
PersistentConcurrentOffHeapHashMap
public abstract class AbstractPersistentConcurrentOffHeapMap<K,V> extends AbstractConcurrentOffHeapMap<K,V> implements Persistent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap
AbstractConcurrentOffHeapMap.AggregateIterator<T>
-
-
Field Summary
Fields Modifier and Type Field Description private static intMAGIC-
Fields inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap
segments
-
-
Constructor Summary
Constructors Constructor Description AbstractPersistentConcurrentOffHeapMap(Factory<? extends Segment<K,V>> segmentFactory)Create a concurrent map using a default number of segments.AbstractPersistentConcurrentOffHeapMap(Factory<? extends Segment<K,V>> segmentFactory, int concurrency)Create a concurrent map with a defined number of segments.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbootstrap(java.io.ObjectInput input)voidclose()voidflush()voidpersist(java.io.ObjectOutput output)protected static intreadSegmentCount(java.io.ObjectInput input)-
Methods inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap
clear, computeIfAbsentWithMetadata, computeIfPresentWithMetadata, computeWithMetadata, containsKey, containsValue, destroy, entrySet, fill, 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, segmentFor, size, values, writeLockAll, writeUnlockAll
-
Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, isEmpty, putAll, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
MAGIC
private static final int MAGIC
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractPersistentConcurrentOffHeapMap
public AbstractPersistentConcurrentOffHeapMap(Factory<? extends Segment<K,V>> segmentFactory)
Create a concurrent map using a default number of segments.- Parameters:
segmentFactory- factory used to create the map segments
-
AbstractPersistentConcurrentOffHeapMap
public AbstractPersistentConcurrentOffHeapMap(Factory<? extends Segment<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:
java.lang.IllegalArgumentException- if the supplied number of segments is negative
-
-
Method Detail
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacePersistent- Throws:
java.io.IOException
-
persist
public void persist(java.io.ObjectOutput output) throws java.io.IOException- Specified by:
persistin interfacePersistent- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacePersistent- Throws:
java.io.IOException
-
bootstrap
public void bootstrap(java.io.ObjectInput input) throws java.io.IOException- Specified by:
bootstrapin interfacePersistent- Throws:
java.io.IOException
-
readSegmentCount
protected static int readSegmentCount(java.io.ObjectInput input) throws java.io.IOException- Throws:
java.io.IOException
-
-