DataSerializable.Replaceable (Apache Geode 1.15.4)

org.apache.geode

## Interface DataSerializable.Replaceable

- Enclosing interface:
    DataSerializable

      public static interface DataSerializable.Replaceable

  `Replaceable` allows an object to write an alternative version of itself to a `DataOutput`. It is similar to the `writeReplace` method of standard Java serialization.

  Note that if a `Replaceable` is also `DataSerializable`, its `toData` method will not be invoked. Instead, its replacement object will be written to the stream using `DataSerializer.writeObject(Object, DataOutput)`.

  See Also:
    `DataSerializer.writeObject(Object, DataOutput)`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `replace()` Replaces this object with another in the "output stream" written by `DataSerializer.writeObject(Object, DataOutput)`.

- - ### Method Detail

    - #### replace

          Object replace()
                  throws IOException

      Replaces this object with another in the "output stream" written by `DataSerializer.writeObject(Object, DataOutput)`.
      Returns:
        the object that will be used to replace this object
      Throws:
        `IOException` - if an exception is encountered