Reputation: 16851
If I want to set a bucket in Redisson, do I need to prevent race condition by incorporating Redisson.getLock()
? Or RBucket.set()
does that internally?
In general, other than application requirements, is there any scenario that I need to surround a block by locks before setting / getting something to / from Redisson?
Upvotes: 0
Views: 973
Reputation: 10793
Actually you don't need to use Lock with Bucket object, because all redis/redisson operations are atomic.
Upvotes: 1