Class ParallelCompactor


  • public class ParallelCompactor
    extends CheckpointCompactor
    This compactor implementation leverages the tree structure of the repository for concurrent compaction. It explores the tree breadth-first until the target node count (10000) is reached. Every node at this depth will be an entry point for asynchronous compaction. After the exploration phase, the main thread will collect these compaction results and write their parents' node state to disk.
    • Constructor Detail

      • ParallelCompactor

        public ParallelCompactor​(@NotNull
                                 @NotNull GCMonitor gcListener,
                                 @NotNull
                                 @NotNull CompactionWriter writer,
                                 @NotNull
                                 @NotNull GCNodeWriteMonitor compactionMonitor,
                                 int nThreads)
        Create a new instance based on the passed arguments.
        Parameters:
        gcListener - listener receiving notifications about the garbage collection process
        writer - segment writer used to serialise to segments
        compactionMonitor - notification call back for each compacted nodes, properties, and binaries
        nThreads - number of threads to use for parallel compaction, negative numbers are interpreted relative to the number of available processors