Class GCJournal


  • public class GCJournal
    extends java.lang.Object
    Persists the repository size and the reclaimed size following a cleanup operation in the gc.log file with the format: 'repoSize, reclaimedSize, timestamp, gc generation, gc full generation (since Oak 1.8), number of nodes compacted, root id (since Oak 1.8)'.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void persist​(long reclaimedSize, long repoSize, @NotNull GCGeneration gcGeneration, long nodes, @NotNull java.lang.String root)
      Persists the repository stats (current size, reclaimed size, gc generation, number of compacted nodes) following a cleanup operation for a successful compaction.
      GCJournal.GCJournalEntry read()
      Returns the latest entry available
      java.util.Collection<GCJournal.GCJournalEntry> readAll()
      Returns all available entries from the journal
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GCJournal

        public GCJournal​(@NotNull
                         @NotNull GCJournalFile journalFile)
    • Method Detail

      • persist

        public void persist​(long reclaimedSize,
                            long repoSize,
                            @NotNull
                            @NotNull GCGeneration gcGeneration,
                            long nodes,
                            @NotNull
                            @NotNull java.lang.String root)
        Persists the repository stats (current size, reclaimed size, gc generation, number of compacted nodes) following a cleanup operation for a successful compaction. NOOP if the gcGeneration is the same as the one persisted previously.
        Parameters:
        reclaimedSize - size reclaimed by cleanup
        repoSize - current repo size
        gcGeneration - gc generation
        nodes - number of compacted nodes
        root - record id of the compacted root node
      • readAll

        public java.util.Collection<GCJournal.GCJournalEntry> readAll()
        Returns all available entries from the journal