Reputation: 21
Newbie to Hazelcast...
Interested to find out how do I get Hazelcast cluster to populate a map on startup. Read up and implemented com.hazelcast.core.MapLoader, then in my Spring config I have the following:
<hz:map name="products">
<hz:map-store write-delay-seconds="0" class-name="my.company.ProductMapLoader"
enabled="true" initial-mode="EAGER" />
<hz:indexes>
<hz:index attribute="clientId" ordered="true"/>
</hz:indexes>
</hz:map>
I even set the initial-mode="EAGER" to no avail.
Any ideas?
Upvotes: 2
Views: 1140
Reputation: 493
This is just the config part. You need to define a bean for the map that uses this config (outside of the hz:instance
tag)
Here is a sample;
<hz:map id="products" instance-ref="instance" name="products" />
Above, id
is your handle to that bean (regular spring bean id), name
is the reference to your map config.
Upvotes: 4