You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Evgenii Zhuravlev <e....@gmail.com> on 2020/01/08 19:39:03 UTC

Re: Custom Java Objects as Key in IgniteCache with persistence enabled

Hi,

No, equals/hashCode from Objects are not used by Ignite. For example, to
calculate hashCode for the object, Ignite uses BinaryArrayIdentityResolver
which calculates hashCode from serialized object. As for key equity - it
compares serialised forms of the objects.

Best Regards,
Evgenii

пн, 30 дек. 2019 г. в 09:22, Mitchell Rathbun (BLOOMBERG/ 731 LEX) <
mrathbun1@bloomberg.net>:

> Sorry for the delayed response, I have not since been able to reproduce
> this. In general how does key equality work with Ignite, given that the
> keys in the cache must be serialized? Does equals/hashCode even come into
> play?
>
> From: user@ignite.apache.org At: 12/19/19 04:27:04
> To: user@ignite.apache.org
> Subject: Re: Custom Java Objects as Key in IgniteCache with persistence
> enabled
>
> Hi, Mitchell!
>
> I can't reproduce your case, i.e. key objects are put correctly in my case.
> Could you send a link to your code, for example on github?
>
> Here is my attempt to reproduce:
>
> https://github.com/shishkovilja/ignite/blob/d35ec9ee05f61692f1e3301ca3258fbe86f9
>
> b4f7/modules/core/src/test/java/org/apache/ignite/userlist/CustomObjectTest.java
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
>
>