Im using Geode/Gemfire Peer-to-Peer topology with a replicated region. I want this region to be refreshed every X hrs. I think this will require some locking on the region to ensure members dont refresh within X hrs.
Few observations/questions:
- Locking is available only on
Scope.GLOBAL
regions but my region isScope.DISTRIBUTED_ACK
. I can change my region to beScope.GLOBAL
but what is the difference between the two? - Another way to achieve what I want: Create another region (with only one entry with key
lastRefreshAt
and value anInstant
) that I can get a lock on (this region will beScope.GLOBAL
). Member after getting the lock will check iflastRefreshAt
< X hrs, if true, refresh and release lock. This will allow me keep my original region asScope.DISTRIBUTED_ACK
. - Last but not least, how to obtain the lock on a region. Im using SDG (Spring Data Geode).
Thank you and Im open for other suggestions.