How adding a functional utility helps to avoid code duplications and leads to more readable code.
In Spring Data Redis, we support multiple Redis clients – Jedis and Lettuce.
Commands can be invoked either directly, in a transaction, or using pipelining.
Direct commands get invoked – as the name probably reveals – directly by calling a client method and returning the result. In some cases, results require post-processing because the Redis driver reports a
Long while Spring Data Redis would like to return
Boolean or the driver returns a driver-specific type that requires conversion in a Spring Data type.