Delta (Apache Geode 1.12.8)
Date: 2022-01-10

org.apache.geode

## Interface Delta

- All Known Implementing Classes:
    DeltaSession, DeltaSession7, DeltaSession8, DeltaSession9

      public interface Delta

  This interface defines a contract between the application and GemFire that allows GemFire to determine whether an application object contains a delta, allows GemFire to extract the delta from an application object, and generate a new application object by applying a delta to an existing application object. The difference in object state is contained in the `DataOutput` and `DataInput` parameters.
  Since:
    GemFire 6.1

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `fromDelta(DataInput in)` This method is invoked on an existing application object when an update is received as a delta.
    `boolean` | `hasDelta()` Returns true if this object has pending changes it can write out as a delta.
    `void` | `toDelta(DataOutput out)` This method is invoked on an application object at the delta sender, if GemFire determines the presence of a delta by calling `hasDelta()` on the object.

- - ### Method Detail

    - #### hasDelta

          boolean hasDelta()

      Returns true if this object has pending changes it can write out as a delta. Returns false if this object must be transmitted in its entirety.

    - #### toDelta

          void toDelta(DataOutput out)
                throws IOException

      This method is invoked on an application object at the delta sender, if GemFire determines the presence of a delta by calling `hasDelta()` on the object. The delta is written to the `DataOutput` object provided by GemFire. Any delta state should be reset in this method.
      Throws:
        `IOException`

    - #### fromDelta

          void fromDelta(DataInput in)
                  throws IOException,
                         InvalidDeltaException

      This method is invoked on an existing application object when an update is received as a delta. This method throws an `InvalidDeltaException` when the delta in the `DataInput` cannot be applied to the object. GemFire automatically handles an `InvalidDeltaException` by reattempting the update by sending the full application object.
      Throws:
        `IOException`
        `InvalidDeltaException`