Class Compactor

    • Constructor Detail

      • Compactor

        public Compactor()
    • 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 between after and before on top of after.
        Parameters:
        before - the node state to diff against from after
        after - the node state diffed against before
        hardCanceller - the trigger for hard cancellation, will abandon compaction if cancelled
        softCanceller - 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 between after and before on top of before.
        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 between after and before on top of onto.
        Parameters:
        before - the node state to diff against from after
        after - the node state diffed against before
        onto - the node state to compact to apply the diff to
        canceller - 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