Hi,
I have 3 java classes ClassA, ClassB, ClassC.
ClassA{
int idA;
String stringA;
public ClassA(){}
public ClassA(int idA,String stringA){
this.idA=idA;
this.stringA=stringA;
}
public int getidA(){
return idA;
}
public String getstringA(){
return stringA;
}
}
ClassB{
int idB;
String stringB;
public ClassB(){}
public ClassB(int idB,String stringB){
this.idB=idB;
this.stringB=stringB;
}
public int getidB(){
return idB;
}
public String getstringB(){
return stringB;
}
}
ClassC{
int idC,idB;
String stringC;
public ClassC(){}
public ClassB(int idB,int idC,String stringC){
this.idC=idC;
this.stringC=stringC;
}
public int getidC(){
return idC;
}
public String getstringC(){
return stringC;
}
}
I want ClassA in replicated mode and B & C in partitioned mode. ClassC is
related to ClassB. The id of ClassB is present in ClassC (acting like a
foreign key). Say, I have 3 nodes, 30 ClassA objects, 30 ClassB objects and
30 ClassC objects. They are distributed in nodes like below;
Node 1 => ClassA->30, ClassB->10,ClassC->8
Node 2 => ClassA->30, ClassB->5,ClassC->3
Node 3 => ClassA->30, ClassB->15,ClassC->19
Objects of ClassC related to ClassB should present in same node. I know that
there is some mechanism AffinityKey, but I don't know how to implement this.
Could somebody tell me how to do this?
Thanks in advance..
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/How-to-create-class-affinity-tp12211.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.