ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From November <yufeng7...@126.com>
Subject How does AffinityKey mapped?
Date Wed, 13 Jul 2016 08:58:22 GMT
Hi

I have read http://apacheignite.gridgain.org/docs/affinity-collocation and
java example.

I don't know how AffinityKey map? Like following code in java example. 
How does ignite know EmployeeKey's organizationId should collocate with
Organization's id (not other fields). I can't find anything map them in
configuration.

Another question: how to use AffinityKey in .Net. Will just replace
@AffinityKeyMapped with [AffinityKeyMapped] work or there is other thing
different?

public class EmployeeKey {
    /** ID. */
    private int id;

    /** Organization ID. */
    @AffinityKeyMapped
    private int organizationId;
}

public class Organization {
    /** */
    private static final AtomicLong ID_GEN = new AtomicLong();

    /** Organization ID (indexed). */
    @QuerySqlField(index = true)
    private Long id;

    /** Organization name (indexed). */
    @QuerySqlField(index = true)
    private String name;

    /** Address. */
    private Address addr;

    /** Type. */
    private OrganizationType type;

    /** Last update time. */
    private Timestamp lastUpdated;

}



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-does-AffinityKey-mapped-tp6260.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message