Class RetainedSizeCache
java.lang.Object
org.eclipse.mat.parser.internal.snapshot.RetainedSizeCache
- All Implemented Interfaces:
IIndexReader
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.mat.parser.index.IIndexReader
IIndexReader.IOne2LongIndex, IIndexReader.IOne2ManyIndex, IIndexReader.IOne2ManyObjectsIndex, IIndexReader.IOne2OneIndex, IIndexReader.IOne2SizeIndex -
Constructor Summary
ConstructorsConstructorDescriptionFile is expected to exist, and is read in the new format.RetainedSizeCache(XSnapshotInfo snapshotInfo) Reads file i2sv2.index in new format, or file i2s.index in the old format, or creates an empty map. -
Method Summary
-
Constructor Details
-
RetainedSizeCache
File is expected to exist, and is read in the new format.- Parameters:
f-
-
RetainedSizeCache
Reads file i2sv2.index in new format, or file i2s.index in the old format, or creates an empty map.- Parameters:
snapshotInfo-
-
-
Method Details
-
get
public long get(int key) -
put
public void put(int key, long value) -
close
public void close()Description copied from interface:IIndexReaderClose the backing file.- Specified by:
closein interfaceIIndexReader
-
size
public int size()Description copied from interface:IIndexReaderSize of the index- Specified by:
sizein interfaceIIndexReader- Returns:
- number of entries
-
unload
Description copied from interface:IIndexReaderClear the caches. Used when the indexes are not current in use and the memory needs to be reclaimed such as when building the dominator tree.- Specified by:
unloadin interfaceIIndexReader- Throws:
IOException
-
delete
public void delete()Description copied from interface:IIndexReaderDelete the backing file.- Specified by:
deletein interfaceIIndexReader
-