Package com.helixframework.delta
Interface DeltaEngine
- All Known Implementing Classes:
DefaultDeltaEngine
public interface DeltaEngine
Computes replayable deltas between two JSON documents and applies them later.
-
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.JsonNodeapply(com.fasterxml.jackson.databind.JsonNode before, DeltaResult delta) Applies a computed delta to a source document.compute(com.fasterxml.jackson.databind.JsonNode before, com.fasterxml.jackson.databind.JsonNode after) Computes a deterministic delta between two Jackson trees.Parses two JSON strings and computes a deterministic delta between them.
-
Method Details
-
compute
DeltaResult compute(com.fasterxml.jackson.databind.JsonNode before, com.fasterxml.jackson.databind.JsonNode after) Computes a deterministic delta between two Jackson trees.- Parameters:
before- original documentafter- target document- Returns:
- computed delta result
- Throws:
DeltaComputationException- if the comparison cannot be completed
-
compute
Parses two JSON strings and computes a deterministic delta between them.- Parameters:
beforeJson- original document as JSONafterJson- target document as JSON- Returns:
- computed delta result
- Throws:
InvalidJsonException- if either JSON payload cannot be parsed
-
apply
com.fasterxml.jackson.databind.JsonNode apply(com.fasterxml.jackson.databind.JsonNode before, DeltaResult delta) Applies a computed delta to a source document.- Parameters:
before- original documentdelta- previously computed delta- Returns:
- reconstructed target document
- Throws:
DeltaApplyException- if replay fails
-