Implementers can be written to a StreamOutput
and read from a StreamInput
. This allows them to be "thrown
across the wire" using Elasticsearch's internal protocol. If the implementer also implements equals and hashCode then a copy made by
serializing and deserializing must be equal and have the same hashCode. It isn't required that such a copy be entirely unchanged.
Prefer implementing this interface over implementing
Streamable where possible. Lots of code depends on Streamable
so this isn't always possible.