Class GCJournal

java.lang.Object
org.apache.jackrabbit.oak.segment.file.GCJournal

public class GCJournal extends 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)'.
  • Constructor Details

    • GCJournal

      public GCJournal(@NotNull @NotNull GCJournalFile journalFile)
  • Method Details

    • persist

      public void persist(long reclaimedSize, long repoSize, @NotNull @NotNull GCGeneration gcGeneration, long nodes, @NotNull @NotNull 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
    • read

      public GCJournal.GCJournalEntry read()
      Returns the latest entry available
    • readAll

      Returns all available entries from the journal