Package org.eclipse.mat.parser.index
Class IndexReader.LongIndexReader
- java.lang.Object
-
- org.eclipse.mat.parser.index.IndexReader.LongIndexReader
-
- All Implemented Interfaces:
IIndexReader,IIndexReader.IOne2LongIndex
- Enclosing class:
- IndexReader
public static class IndexReader.LongIndexReader extends java.lang.Object implements IIndexReader.IOne2LongIndex
Creates a int to long index reader Disk file structure:Page 0: ArrayLongCompressed Page 1: ArrayLongCompressed ... Page n: ArrayLongCompressed page 0 start in file (8) page 1 start in file (8) ... page n start in file (8) page n+1 start in file (8) (i.e. location of 'page 0 start in file' field) page size (4) total size (4)
-
-
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
Constructors Constructor Description LongIndexReader(java.io.File indexFile)LongIndexReader(java.io.File indexFile, HashMapIntObject<java.lang.Object> pages, int size, int pageSize, long[] pageStart)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the backing file.voiddelete()Delete the backing file.longget(int index)long[]getNext(int index, int length)IteratorLongiterator()intreverse(long value)Find the int corresponding to the long in the index value.voidset(int index, long value)intsize()voidunload()Clear the caches.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.mat.parser.index.IIndexReader
size
-
Methods inherited from interface org.eclipse.mat.parser.index.IIndexReader.IOne2LongIndex
get, getNext
-
-
-
-
Constructor Detail
-
LongIndexReader
public LongIndexReader(java.io.File indexFile, HashMapIntObject<java.lang.Object> pages, int size, int pageSize, long[] pageStart) throws java.io.IOException- Throws:
java.io.IOException
-
LongIndexReader
public LongIndexReader(java.io.File indexFile) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
close
public void close()
Description copied from interface:IIndexReaderClose the backing file.- Specified by:
closein interfaceIIndexReader
-
reverse
public int reverse(long value)
Description copied from interface:IIndexReader.IOne2LongIndexFind the int corresponding to the long in the index value. The reverse ofIIndexReader.IOne2LongIndex.get(int)- Specified by:
reversein interfaceIIndexReader.IOne2LongIndex- Parameters:
value- the value to look up- Returns:
- the correspond int key in the index
-
unload
public void 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
-
delete
public void delete()
Description copied from interface:IIndexReaderDelete the backing file.- Specified by:
deletein interfaceIIndexReader
-
get
public long get(int index)
-
getNext
public long[] getNext(int index, int length)
-
set
public void set(int index, long value)
-
size
public int size()
-
iterator
public IteratorLong iterator()
-
-