Class IndexWriter.InboundWriter

  • Enclosing class:
    IndexWriter

    public static class IndexWriter.InboundWriter
    extends 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 Detail

      • InboundWriter

        public InboundWriter​(int size,
                             File indexFile)
                      throws IOException
        Construct an inbound writer.
        Parameters:
        size - the number of entries
        indexFile - the index file to be written to
        Throws:
        IOException - if there is a problem writing the file
    • Method Detail

      • log

        public void log​(int objectIndex,
                        int refIndex,
                        boolean isPseudo)
                 throws IOException
        Record an inbound reference.
        Parameters:
        objectIndex - the object has a reference from ref
        refIndex - the reference
        isPseudo - is this a pseudo reference, first entry of the outbounds (e.g. class ID)
        Throws:
        IOException - if there is a problem with the write
      • cancel

        public void cancel()
        Terminate the InboundWriter and delete any files which have been written so far. Use to cancel part way through.
      • getIndexFile

        public File getIndexFile()