Class MergeConflictResult

java.lang.Object
com.linkedin.davinci.replication.merge.MergeConflictResult

public class MergeConflictResult extends Object
An object to encapsulate the results of conflict resolution to denote how the operation and value that should be applied or if the current update should be ignored.
  • Constructor Details

    • MergeConflictResult

      public MergeConflictResult(ByteBuffer newValue, int valueSchemaID, boolean resultReusesInput, org.apache.avro.generic.GenericRecord rmdRecord)
    • MergeConflictResult

      public MergeConflictResult(ByteBuffer newValue, Optional<org.apache.avro.generic.GenericRecord> deserializedValue, int valueSchemaID, boolean resultReusesInput, org.apache.avro.generic.GenericRecord rmdRecord)
  • Method Details

    • getIgnoredResult

      public static MergeConflictResult getIgnoredResult()
    • getValueSchemaId

      public int getValueSchemaId()
    • getNewValue

      public ByteBuffer getNewValue()
    • isUpdateIgnored

      public boolean isUpdateIgnored()
    • doesResultReuseInput

      public boolean doesResultReuseInput()
    • getRmdRecord

      public org.apache.avro.generic.GenericRecord getRmdRecord()
    • getDeserializedValue

      public Optional<org.apache.avro.generic.GenericRecord> getDeserializedValue()
      Provide the deserialized new value on a best-effort approach. Meaning that it's acceptable to return an empty Optional. e.g. MergeConflictResult of full PUTs will not contain deserialized new value since we don't need to deserialize the value to generate the MCR.
      Returns:
      deserialized new value if possible.