ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From afedotov <alexander.fedot...@gmail.com>
Subject Re: Can the cache key and affinity key be different
Date Mon, 04 Dec 2017 11:59:06 GMT
Hi,

To collocate A and B with C you need to introduce custom key classes
for A and B that will include @AffinityKeyMapped annotation on a C's ID
field.
An example of how to implement such a key could be found here
https://apacheignite.readme.io/docs/affinity-collocation#section-collocate-data-with-data

For example, for A you should have something like
public class AKey {
    /** A's ID. */
    private Long id;
 
    /** C's ID to collocate to. */
    @AffinityKeyMapped
    private Long cId;
    ...
}



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Mime
View raw message