ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Setrakyan <dsetrak...@apache.org>
Subject Re: Enums and binary types.
Date Tue, 24 Nov 2015 08:54:31 GMT
On Tue, Nov 24, 2015 at 11:23 AM, Vladimir Ozerov <vozerov@gridgain.com>
wrote:

> Folks,
>
> Recently we revealed an inconsistency in our binary serialization when
> BinaryObject.field() is called (*IGNITE-1956*):
> - When field is an object, BinaryObject is returned, i.e. it is not
> deserialized.
> - When field is enum, we always try to deserialize it. This way, user
> cannot work with enums if corresponding class is not loaded to JVM (or type
> is not loaded to .NET).
>
> The problem can be solved using three new methods:
> 1) BinaryType.isEnum() - to let user know whether type is enum or not.
> 2) BinaryObject.enumOrdinal() - to get ordinal is this object is enum.
> Exception will be thrown otherwise.
> 3) IgniteBinaries.createEnum(String typeName, int ordinal) - to create
> enums when there is not matching class/type in runtime.
>
> Thoughts?
>

I think it makes sense. Would be nice to see the updated javadoc. Can you
please send the links whenever the javadoc is updated?


>
> Vladimir.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message