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

range ops with limits missing from BoundZSetOperations [DATAREDIS-236]

Open spring-projects-issues opened this issue 12 years ago • 4 comments

Jennifer Hickey opened DATAREDIS-236 and commented

The range and reverseRange methods that allow a user to specify an offset and count are present in the ZSetOperations interface, but not the BoundZSetOperations


Affects: 1.0.6, 1.1.0.RC1

spring-projects-issues avatar Aug 30 '13 13:08 spring-projects-issues

Anoop Gopalakrishnan commented

Can the severity of this be bumped up if possible?

spring-projects-issues avatar Sep 01 '13 18:09 spring-projects-issues

Jennifer Hickey commented

Can you describe why this is more impactful for your scenario? I assumed it would be a minor inconvenience to use ZSetOperations instead of BoundZSetOperations in most cases. Do you have a lot of places you would have to modify to inject both interfaces?

spring-projects-issues avatar Sep 02 '13 07:09 spring-projects-issues

Anoop Gopalakrishnan commented

Hi Jennifer, As mentioned earlier in the forum post, I do not directly interact with the redis template rather through a spring integration store inbound channel adapter with a poller. The source poller then creates a a DefaultRedisZSet object which is injected with the redistemplate as a constructor where the BoundZsetOperation is created. However the redis template is not exposed through a getter message. If this was so, I could in my downstream component just call payload.getTemplate().rangeByScore(key, int, int, int, int) as you suggested.

I could as a workaround instead of using the default inbound adapter from SI, create my own Service Activator to do the job. That said, would be great if this can be included in the upcoming release so that I could use the components from SI as is. One could argue though that this is minor

spring-projects-issues avatar Sep 04 '13 23:09 spring-projects-issues

Mark Paluch commented

We should add the following methods:

  • rangeByScoreWithScores
  • rangeByScore
  • reverseRangeByScore
  • reverseRangeByScoreWithScores

spring-projects-issues avatar Feb 13 '20 10:02 spring-projects-issues