0

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 is Scope.DISTRIBUTED_ACK. I can change my region to be Scope.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 an Instant) that I can get a lock on (this region will be Scope.GLOBAL). Member after getting the lock will check if lastRefreshAt < X hrs, if true, refresh and release lock. This will allow me keep my original region as Scope.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.

Boss Man
  • 587
  • 2
  • 12

0 Answers0