Interface GCJournalFile

  • All Known Implementing Classes:
    AwsGCJournalFile, AzureGCJournalFile, LocalGCJournalFile

    public interface GCJournalFile
    This type abstracts the gc.log file, used to save information about the segment garbage collection. Each record is represented by a single string.

    The implementation doesn't need to be thread-safe.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> readLines()
      Return the list of all written records in the same order as they were written.
      void truncate()
      Removes the content of the gc.log
      void writeLine​(java.lang.String line)
      Write the new line to the GC journal file.
    • Method Detail

      • writeLine

        void writeLine​(java.lang.String line)
                throws java.io.IOException
        Write the new line to the GC journal file.
        Parameters:
        line - the line to write. It should contain neither special characters nor the newline \n.
        Throws:
        java.io.IOException
      • readLines

        java.util.List<java.lang.String> readLines()
                                            throws java.io.IOException
        Return the list of all written records in the same order as they were written.
        Returns:
        the list of all written lines
        Throws:
        java.io.IOException
      • truncate

        void truncate()
               throws java.io.IOException
        Removes the content of the gc.log
        Throws:
        java.io.IOException