org.terracotta.offheapstore.disk.persistent
Class AbstractPersistentConcurrentOffHeapMap<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap<K,V>
          extended by org.terracotta.offheapstore.disk.persistent.AbstractPersistentConcurrentOffHeapMap<K,V>
All Implemented Interfaces:
ConcurrentMap<K,V>, 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

Author:
cdennis

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>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap
segments
 
Constructor Summary
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
 void bootstrap(ObjectInput input)
           
 void close()
           
 void flush()
           
 void persist(ObjectOutput output)
           
protected static int readSegmentCount(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
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty, putAll
 

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 segments
concurrency - number of segments in the map
Throws:
IllegalArgumentException - if the supplied number of segments is negative
Method Detail

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.