Skip to content
This repository was archived by the owner on Apr 5, 2022. It is now read-only.
This repository was archived by the owner on Apr 5, 2022. It is now read-only.

Improve RedisFieldValueCounterRepository #9

@artembilan

Description

@artembilan

From @sabbyanandan on May 6, 2016 17:8

From @ericbottard on December 18, 2015 11:21

Investigate possibility of directly serializing to a Map (instead of a Set<ZSetOperations.TypedTuple<String>>) in RedisFieldValueCounterRepository.getZSetData(String counterKey)

see https://github.com/spring-cloud/spring-cloud-stream-modules/blob/7004eedcf5a8df87eaf8f9a3a796c0dab26ed5c0/field-value-counter-sink/src/main/java/org/springframework/cloud/stream/module/metrics/RedisFieldValueCounterRepository.java#L105

Copied from original issue: spring-cloud/spring-cloud-stream-modules#138

Copied from original issue: spring-cloud/spring-cloud-stream-app-starters#67

Copied from original issue: spring-attic/field-value-counter#1

The old code says:

protected Map<String, Double> getZSetData(String counterKey) {
		// TODO directly serialize into a Map vs Set of TypedTuples to avoid extra copy
		Set<ZSetOperations.TypedTuple<String>> rangeWithScore = this.redisTemplate
.boundZSetOps(counterKey).rangeWithScores(0, -1);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions