Reputation: 641
In GridGain, I have to load data such that the primary key is a composite key.
Say I have
class Person{
int id;
int officeId;
...
}
Here I want to add as primary key both id and officeId. Is it possible to add a composite key in GridGain?
Upvotes: 1
Views: 115
Reputation: 2292
in GridGain any Object can be used as a key, just like with HashMaps. You need to make sure that you override equals(...)
and hashCode()
methods for the composite keys.
Upvotes: 2