ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Ozerov <voze...@gridgain.com>
Subject Re: Externalizable in cache
Date Tue, 16 Feb 2016 13:07:42 GMT
Alex,

In ObjectOutputStream if you read byte array and still have some other data
in the stream, it will return you -1. So as I understand, from user
perspective it is normal to wait for -1. What do you think?

Vladimir.

On Tue, Feb 16, 2016 at 2:54 PM, Alexey Goncharuk <
alexey.goncharuk@gmail.com> wrote:

> Agree that this should be fixed. However, from the end-user perspective
> this should never be an issue because at some point in future Ignite might
> need to append some extra bytes to the Externalizable object layout, thus
> reading beyond that limit will break the unmarshalling process.
>
> If, by the time we invoke readExternal, we know the size of the written
> externalizable object then we can create a thin wrapper around the existing
> input stream which will provide the desired behavior. However, this will
> come at a cost of generating more garbage, so I would just fix the return
> value for the input stream.
>

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