我在使用MapStore和Hazelcast时遇到了一个奇怪的问题。我已经实现了一个MapStore,并将其持久化到数据库中。当我启动Hazelcast应用程序时,我有两个成员。当我的客户端程序调用map.put(key, object)时,只有当它在成员1上时才会被存储,而当它在成员2上时,条目就不会被持久化。请看下面的截图。我的数据库表有5条记录,但我缺少5702成员的7条记录。我的数据库表有5条记录,但我缺少了5702成员的7条记录,我希望在我的数据库表中有12条记录。什么是错的?
下面是我的mapstore配置,它是在applicationContext中,因为我使用了spring,jpa,hibernate。
<!-- Mapstores -->
<bean id="customerMap" class="nl.ict.psa.ocr.hazelcast.mapstores.CustomerMapStore"/>
<hz:hazelcast id="instance">
<hz:config>
<hz:management-center enabled="true" url="http://localhost:6060/mancenter"/>
<hz:network port="${hz.network.port}" port-auto-increment="${hz.port.autoincrement}">
<hz:join>
<hz:multicast enabled="true" />
</hz:join>
</hz:network>
<hz:map name="customer" read-backup-data="true">
<hz:map-store write-coalescing="true" enabled="true" write-delay-seconds="${hz.write.delay.seconds}"
initial-mode="LAZY"
implementation="customerMap"/>
</hz:map>
</hz:config>
</hz:hazelcast>
port-auto-increment = false, write-delay-seconds = 0。
谢谢你
J