Class ClassicCompactor
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.ClassicCompactor
-
- All Implemented Interfaces:
Compactor
public class ClassicCompactor extends java.lang.Object implements Compactor
Instances of this class can be used to compact a node state. I.e. to create a clone of a given node state without value sharing except for binaries. Binaries that are stored in a list of bulk segments will still value share the bulk segments (but not the list records). A node can either be compacted on its own or alternatively the difference between two nodes can be compacted on top of an already compacted node.
-
-
Constructor Summary
Constructors Constructor Description ClassicCompactor(@NotNull SegmentReader reader, @NotNull SegmentWriter writer, @Nullable org.apache.jackrabbit.oak.spi.blob.BlobStore blobStore, @NotNull GCNodeWriteMonitor compactionMonitor)
Create a new instance based on the passed arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable SegmentNodeState
compact(@NotNull org.apache.jackrabbit.oak.spi.state.NodeState before, @NotNull org.apache.jackrabbit.oak.spi.state.NodeState after, @NotNull org.apache.jackrabbit.oak.spi.state.NodeState onto, Canceller canceller)
compact the differences betweenafter
andbefore
on top ofont
.@Nullable SegmentNodeState
compact(@NotNull org.apache.jackrabbit.oak.spi.state.NodeState state, Canceller canceller)
Compact a givenstate
-
-
-
Constructor Detail
-
ClassicCompactor
public ClassicCompactor(@NotNull @NotNull SegmentReader reader, @NotNull @NotNull SegmentWriter writer, @Nullable @Nullable org.apache.jackrabbit.oak.spi.blob.BlobStore blobStore, @NotNull @NotNull GCNodeWriteMonitor compactionMonitor)
Create a new instance based on the passed arguments.- Parameters:
reader
- segment reader used to read from the segmentswriter
- segment writer used to serialise to segmentsblobStore
- the blob store ornull
if nonecompactionMonitor
- notification call back for each compacted nodes, properties, and binaries
-
-
Method Detail
-
compact
@Nullable public @Nullable SegmentNodeState compact(@NotNull @NotNull org.apache.jackrabbit.oak.spi.state.NodeState state, Canceller canceller) throws java.io.IOException
Compact a givenstate
- Parameters:
state
- the node state to compact- Returns:
- the compacted node state or
null
if cancelled. - Throws:
java.io.IOException
-
compact
@Nullable public @Nullable SegmentNodeState compact(@NotNull @NotNull org.apache.jackrabbit.oak.spi.state.NodeState before, @NotNull @NotNull org.apache.jackrabbit.oak.spi.state.NodeState after, @NotNull @NotNull org.apache.jackrabbit.oak.spi.state.NodeState onto, Canceller canceller) throws java.io.IOException
compact the differences betweenafter
andbefore
on top ofont
.
-
-