class A implements Serializable{ public int id; public List<B> incomingBs; public A(int x){ this.id=x; }}class B implements Serializable{ public int id; public List<A> outgoingAs; public B(int x){ this.id=x; }}A a1=new A(1);A a2=new A(2);B b1=new B(1);B b2=new B(2);a1.incomingBs.add(b1);a1.incomingBs.add(b2);b1.outgoingAs.add(a1);b1.outgoingAs.add(a2);如上述代码,a1中有b1,b1中有a1。保存在Hazelcast的map中,当作序列化时,会不会引起无限循环嵌套。如果不会,那hazelcast的map 序列化机制是什么。?
添加回答
举报
0/150
提交
取消