Reputation: 366
I have hazelcast map that contains active sessions. I fully implemented MapStore which loads and stores documents from MongoDB. Now I need execute distributed query to process all entries in the map but when Hazelcast evicts entries from the collection, persisted entries are not checking.
What the right way to process all entries in that way?
Do I need write two versions of the query for Hazelcast and for persisted entries in MongoDB?
May be there is configurable behavior for collection to make Hazelcast sync all entries in storage into the map?
Upvotes: 0
Views: 235
Reputation: 1098
Hazelcast queries do not fetch anything from MapLoader. If you know the entries that got evicted (although I am not sure what real purpose would this serve as it contradicts the reason of using an in-memory cache in first place) then you can do a getAll
on those keys before running the query. That will load those “missing” entries back into cache.
Upvotes: 2