spring-data-redis icon indicating copy to clipboard operation
spring-data-redis copied to clipboard

DefaultListOperations : pop from multiple lists [DATAREDIS-1065]

Open spring-projects-issues opened this issue 6 years ago • 1 comments

olivierboudet opened DATAREDIS-1065 and commented

In DefaultListOperations, the *Pop methods accept only one key as arguments. It would be useful to allow multiple keys to pop from. 

 

If I am not wrong, the underlying bLPop method in JedisListCommands accept already a list of keys


No further details from DATAREDIS-1065

spring-projects-issues avatar Nov 15 '19 16:11 spring-projects-issues

Mark Paluch commented

Introducing leftPop for BLPOP respective rightPop accepting multiple keys would either require a key array as the first argument or moving the key argument to the last position to make it a varargs one. Both cases lead to an API that is rather contrary to what we expose right now.

Probably, the variant leftPop(long timeout, TimeUnit unit, K keys...) (same goes for rightPop) would be one that is the most appealing

spring-projects-issues avatar Nov 19 '19 07:11 spring-projects-issues