Class IndexReader.IntIndexReader

  • All Implemented Interfaces:
    IIndexReader, IIndexReader.IOne2OneIndex
    Enclosing class:
    IndexReader

    public static class IndexReader.IntIndexReader
    extends java.lang.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.
    • Constructor Detail

      • IntIndexReader

        public IntIndexReader​(java.io.File indexFile,
                              org.eclipse.mat.parser.index.IndexWriter.Pages<java.lang.ref.SoftReference<ArrayIntCompressed>> pages,
                              int size,
                              int pageSize,
                              long[] pageStart)
      • IntIndexReader

        public IntIndexReader​(java.io.File indexFile)
                       throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • unload

        public void unload()
        Description copied from interface: IIndexReader
        Clear 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:
        unload in interface IIndexReader
      • 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)
      • size

        public int size()