Class ExternalRefSorter

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, BytesRefSorter

    public class ExternalRefSorter
    extends java.lang.Object
    implements BytesRefSorter, java.io.Closeable
    Builds and iterates over sequences stored on disk.
    • Constructor Summary

      Constructors 
      Constructor Description
      ExternalRefSorter​(Sort sort)
      Will buffer all sequences to a temporary file and then sort (all on-disk).
    • Constructor Detail

      • ExternalRefSorter

        public ExternalRefSorter​(Sort sort)
                          throws java.io.IOException
        Will buffer all sequences to a temporary file and then sort (all on-disk).
        Throws:
        java.io.IOException
    • Method Detail

      • add

        public void add​(BytesRef utf8)
                 throws java.io.IOException
        Description copied from interface: BytesRefSorter
        Adds a single suggestion entry (possibly compound with its bucket).
        Specified by:
        add in interface BytesRefSorter
        Throws:
        java.io.IOException - If an I/O exception occurs.
      • close

        public void close()
                   throws java.io.IOException
        Removes any written temporary files.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException