Class Compactor
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.Compactor
-
- Direct Known Subclasses:
CheckpointCompactor
,ClassicCompactor
public abstract class Compactor extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Compactor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract @Nullable CompactedNodeState
compact(@NotNull NodeState before, @NotNull NodeState after, @NotNull NodeState onto, @NotNull Canceller canceller)
compact the differences betweenafter
andbefore
on top ofonto
.@Nullable CompactedNodeState
compactDown(@NotNull NodeState state, @NotNull Canceller hardCanceller, @NotNull Canceller softCanceller)
abstract @Nullable CompactedNodeState
compactDown(@NotNull NodeState before, @NotNull NodeState after, @NotNull Canceller hardCanceller, @NotNull Canceller softCanceller)
compact the differences betweenafter
andbefore
on top ofafter
.@Nullable CompactedNodeState
compactUp(@NotNull NodeState state, @NotNull Canceller canceller)
@Nullable CompactedNodeState
compactUp(@NotNull NodeState before, @NotNull NodeState after, @NotNull Canceller canceller)
compact the differences betweenafter
andbefore
on top ofbefore
.
-
-
-
Method Detail
-
compactDown
@Nullable public final @Nullable CompactedNodeState compactDown(@NotNull @NotNull NodeState state, @NotNull @NotNull Canceller hardCanceller, @NotNull @NotNull Canceller softCanceller) throws java.io.IOException
- Throws:
java.io.IOException
-
compactDown
@Nullable public abstract @Nullable CompactedNodeState compactDown(@NotNull @NotNull NodeState before, @NotNull @NotNull NodeState after, @NotNull @NotNull Canceller hardCanceller, @NotNull @NotNull Canceller softCanceller) throws java.io.IOException
compact the differences betweenafter
andbefore
on top ofafter
.- Parameters:
before
- the node state to diff against fromafter
after
- the node state diffed againstbefore
hardCanceller
- the trigger for hard cancellation, will abandon compaction if cancelledsoftCanceller
- the trigger for soft cancellation, will return partially compacted state if cancelled- Returns:
- the compacted node state or
null
if hard-cancelled - Throws:
java.io.IOException
- will throw exception if any errors occur during compaction
-
compactUp
@Nullable public final @Nullable CompactedNodeState compactUp(@NotNull @NotNull NodeState state, @NotNull @NotNull Canceller canceller) throws java.io.IOException
- Throws:
java.io.IOException
-
compactUp
@Nullable public final @Nullable CompactedNodeState compactUp(@NotNull @NotNull NodeState before, @NotNull @NotNull NodeState after, @NotNull @NotNull Canceller canceller) throws java.io.IOException
compact the differences betweenafter
andbefore
on top ofbefore
.- Throws:
java.io.IOException
-
compact
@Nullable public abstract @Nullable CompactedNodeState compact(@NotNull @NotNull NodeState before, @NotNull @NotNull NodeState after, @NotNull @NotNull NodeState onto, @NotNull @NotNull Canceller canceller) throws java.io.IOException
compact the differences betweenafter
andbefore
on top ofonto
.- Parameters:
before
- the node state to diff against fromafter
after
- the node state diffed againstbefore
onto
- the node state to compact to apply the diff tocanceller
- the trigger for hard cancellation, will abandon compaction if cancelled- Returns:
- the compacted node state or
null
if hard-cancelled - Throws:
java.io.IOException
- will throw exception if any errors occur during compaction
-
-