org.terracotta.offheapstore.disk.persistent
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
- 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, 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, writeUnlockAll |
| Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
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
flush
public void flush()
throws IOException
- Specified by:
flush in interface Persistent
- Throws:
IOException
persist
public void persist(ObjectOutput output)
throws IOException
- Specified by:
persist in interface Persistent
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in interface Persistent
- Throws:
IOException
bootstrap
public void bootstrap(ObjectInput input)
throws IOException
- Specified by:
bootstrap in interface Persistent
- Throws:
IOException
readSegmentCount
protected static int readSegmentCount(ObjectInput input)
throws IOException
- Throws:
IOException
Copyright © 2016. All rights reserved.