Package org.eclipse.mat.parser.index
Class IndexWriter.InboundWriter
- java.lang.Object
-
- org.eclipse.mat.parser.index.IndexWriter.InboundWriter
-
- Enclosing class:
- IndexWriter
public static class IndexWriter.InboundWriter extends java.lang.Object
A writer for inbound references. The object and the inbound reference are stored in a segment based on the object ID. Later the segments are sorted by object ID and then by reference ID before being written out.
-
-
Constructor Summary
Constructors Constructor Description InboundWriter(int size, java.io.File indexFile)
Construct an inbound writer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Terminate the InboundWriter and delete any files which have been written so far.void
close()
IIndexReader.IOne2ManyObjectsIndex
flush(IProgressListener monitor, IndexWriter.KeyWriter keyWriter)
Write out all the data as one big file.java.io.File
getIndexFile()
void
log(int objectIndex, int refIndex, boolean isPseudo)
Record an inbound reference.
-
-
-
Method Detail
-
log
public void log(int objectIndex, int refIndex, boolean isPseudo) throws java.io.IOException
Record an inbound reference.- Parameters:
objectIndex
- the object has a reference from refrefIndex
- the referenceisPseudo
- is this a pseudo reference, first entry of the outbounds (e.g. class ID)- Throws:
java.io.IOException
- if there is a problem with the write
-
flush
public IIndexReader.IOne2ManyObjectsIndex flush(IProgressListener monitor, IndexWriter.KeyWriter keyWriter) throws java.io.IOException
Write out all the data as one big file.- Parameters:
monitor
- to show progress, report errorskeyWriter
- to write out the keys- Returns:
- a reader
- Throws:
java.io.IOException
- if there is a problem reading or writing files
-
cancel
public void cancel()
Terminate the InboundWriter and delete any files which have been written so far. Use to cancel part way through.
-
close
public void close() throws java.io.IOException
- Throws:
java.io.IOException
-
getIndexFile
public java.io.File getIndexFile()
-
-