0
votes

I need atomic Redis increment when application run in multi instance container , after current reach finish value , application will trigger a action.

RedisAtomicLong counter = new RedisAtomicLong("KEY", template.getConnectionFactory());    
currentValue = counter.getAndAdd(1)

I wonder is there any situationm, currentValue will have same value in different instance