The only reasons I can see for consulting the persistent store is ifsome eviction policy is in effect (in my case there's no such policy),
or if the persistent store was modified by some external source (god
forbid). In all other cases I fail to see a reason to check for the
presence of a value that isn't present in the in-memory cluster. So
why does that happen?
How about always returning Null for MapLoader.load(key)? Yes Hazelcast
will still call your load(key) but
at least it will return fast.
> Another question. Let's assume that I have a 100 seconds write delay
> for this storage. I delete using key 'x' from the map. I then load 'x'
> from the map again. At that time the delete of 'x' hasn't yet been
> flushed.
> Will the missing 'x' cause a MapStore lookup? I hope not, because that
> would be wrong.
Yes it will lookup. Currently Hazelcast cannot distinguish 'eviction'
and 'deletion' so it will try to load regardless. I think this part
can be improved.
-talip
> Because in general the full key set is *not* loaded into the cluster. Your
> case is special, and you don't need MapStore/MapLoader at all.I think I do. I want to use it as a disk based backup so that I can
restart the cluster as a whole without loosing any data. But I don't
want it to slow down normal processing.