org.eclipse.mat.parser.index
Class IndexReader.IntIndexReader
java.lang.Object
org.eclipse.mat.parser.index.IndexReader.IntIndexReader
- All Implemented Interfaces:
- IIndexReader, IIndexReader.IOne2OneIndex
- Enclosing class:
- IndexReader
public static class IndexReader.IntIndexReader
- extends Object
- implements IIndexReader.IOne2OneIndex
An int to int index reader.
Disk file structure:
Page 0: ArrayIntCompressed
Page 1: ArrayIntCompressed
...
Page n: ArrayIntCompressed
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)
Experimental for version 1.2:
The disk format has been enhanced to allow more than
2^31 entries by using the page n+1 start pointer to find the start
of the page offsets, and so the number of pages, and the size field
is then negative and used to measure the number of entries on the
last page (from 1 to page size).
This is experimental and index files with 2^31 entries or more
are not compatible with 1.1 or earlier and might not be compatible
with 1.3 or later.
LOCK
public Object LOCK
in
public SimpleBufferedRandomAccessInputStream in
IndexReader.IntIndexReader
public IndexReader.IntIndexReader(File indexFile,
org.eclipse.mat.parser.index.IndexWriter.Pages<SoftReference<ArrayIntCompressed>> pages,
int size,
int pageSize,
long[] pageStart)
IndexReader.IntIndexReader
public IndexReader.IntIndexReader(File indexFile)
throws IOException
- Throws:
IOException
IndexReader.IntIndexReader
public IndexReader.IntIndexReader(SimpleBufferedRandomAccessInputStream in,
long start,
long length)
throws IOException
- Throws:
IOException
close
public void close()
- Description copied from interface:
IIndexReader
- Close the backing file.
- Specified by:
close
in interface IIndexReader
delete
public void delete()
- Description copied from interface:
IIndexReader
- Delete the backing file.
- Specified by:
delete
in interface IIndexReader
get
public int get(int index)
getNext
public int[] getNext(int index,
int length)
getAll
public int[] getAll(int[] index)
set
public void set(int index,
int value)
unload
public void unload()
size
public int size()
iterator
public IteratorInt iterator()