Package org.eclipse.mat.parser.index
Class IndexReader.IntIndex1NSortedReader
java.lang.Object
org.eclipse.mat.parser.index.IndexReader.IntIndex1NSortedReader
- All Implemented Interfaces:
IIndexReader,IIndexReader.IOne2ManyIndex
- Enclosing class:
- IndexReader
-
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
ConstructorsConstructorDescriptionIntIndex1NSortedReader(File indexFile) IntIndex1NSortedReader(File indexFile, IIndexReader.IOne2OneIndex header, IIndexReader.IOne2OneIndex body) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the backing file.voiddelete()Delete the backing file.int[]get(int index) The header holds positions encoded as p+1 into the body There is no length field - the length is up to the next one, which is greater than the first.intsize()Size of the indexvoidunload()Clear the caches.
-
Constructor Details
-
IntIndex1NSortedReader
- Throws:
IOException
-
IntIndex1NSortedReader
public IntIndex1NSortedReader(File indexFile, IIndexReader.IOne2OneIndex header, IIndexReader.IOne2OneIndex body) throws IOException - Throws:
IOException
-
-
Method Details
-
get
public int[] get(int index) The header holds positions encoded as p+1 into the body There is no length field - the length is up to the next one, which is greater than the first. 0 means no data E.g. 10 6 1 0 14 Reading item 0 gets from [10,14) Reading item 1 gets from [6,14) Reading item 2 gets from [1,14) Reading item 3 gets an empty array- Specified by:
getin interfaceIIndexReader.IOne2ManyIndex- Returns:
- an array holding the object IDs
-
close
public void close()Description copied from interface:IIndexReaderClose the backing file.- Specified by:
closein interfaceIIndexReader
-
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
-
size
public int size()Description copied from interface:IIndexReaderSize of the index- Specified by:
sizein interfaceIIndexReader- Returns:
- number of entries
-
delete
public void delete()Description copied from interface:IIndexReaderDelete the backing file.- Specified by:
deletein interfaceIIndexReader
-