Java 8 introduced a few methods to the AtomicInteger/AtomicLong classes, which would be useful to implement on the RedisAtomicInteger/RedisAtomicLong classes provided in spring-data-redis.
They are primarily useful for doing CAS operations, leveraging custom functions (BinaryOperator/UnaryOperator) to generate the new value.
I'm proposing the following new methods for RedisAtomicInteger:
And for RedisAtomicLong:
Does this sound acceptable? I'm planning to submit a new PR for this soon unless it's already being worked on by somebody else.