Class DefaultDeltaEngine

java.lang.Object
com.helixframework.delta.internal.DefaultDeltaEngine
All Implemented Interfaces:
DeltaEngine

public final class DefaultDeltaEngine extends Object implements DeltaEngine
  • Constructor Details

    • DefaultDeltaEngine

      public DefaultDeltaEngine(DeltaOptions options)
  • Method Details

    • compute

      public DeltaResult compute(com.fasterxml.jackson.databind.JsonNode before, com.fasterxml.jackson.databind.JsonNode after)
      Description copied from interface: DeltaEngine
      Computes a deterministic delta between two Jackson trees.
      Specified by:
      compute in interface DeltaEngine
      Parameters:
      before - original document
      after - target document
      Returns:
      computed delta result
    • compute

      public DeltaResult compute(String beforeJson, String afterJson)
      Description copied from interface: DeltaEngine
      Parses two JSON strings and computes a deterministic delta between them.
      Specified by:
      compute in interface DeltaEngine
      Parameters:
      beforeJson - original document as JSON
      afterJson - target document as JSON
      Returns:
      computed delta result
    • apply

      public com.fasterxml.jackson.databind.JsonNode apply(com.fasterxml.jackson.databind.JsonNode before, DeltaResult delta)
      Description copied from interface: DeltaEngine
      Applies a computed delta to a source document.
      Specified by:
      apply in interface DeltaEngine
      Parameters:
      before - original document
      delta - previously computed delta
      Returns:
      reconstructed target document