Hi Mike,

Thanks for the response. I can’t see how that’s possible with the current
Binarylizable interface as enums are immutable, there’s no nullary
constructor for an enum and we can’t update its name after construction. I
gave it a shot to see what would happen but the read/write methods weren’t
being called at all.

Any other suggestions would be much appreciated.

Stuart.

On 4 Feb 2019, at 16:22, Michael Cherkasov <[email protected]>
wrote:

Hi Stuart,

I think you can use Binarylizable interface, you can implement your one
serialization for your enum.

Thanks,
Mike.

пн, 4 февр. 2019 г. в 15:12, Stuart Macdonald <[email protected]>:

> Igniters,
>
> I have some cache objects which contain enum fields, which when persisted
> through Ignite binary persistence are persisted using their enum ordinal
> position. However these enums are often modified whereby new values are
> inserted in the middle of the existing enum values, which breaks
> deserialization by ordinal. Does anyone know of a way to have Ignite
> serialize enums by name (ie. standard java enum serialization), or to allow
> for custom serialization routines for enums?
>
> Many thanks,
> Stuart.
>

Reply via email to