Example usage for org.springframework.data.redis.support.collections RedisZSet add

List of usage examples for org.springframework.data.redis.support.collections RedisZSet add

Introduction

In this page you can find the example usage for org.springframework.data.redis.support.collections RedisZSet add.

Prototype

boolean add(E e, double score);

Source Link

Document

Adds an element to the set with the given score, or updates the score if the element exists.

Usage

From source file:org.springframework.integration.redis.outbound.RedisCollectionPopulatingMessageHandler.java

private void addToZset(RedisZSet<Object> zset, Object objectToAdd, Double score) {
    if (score != null) {
        zset.add(objectToAdd, score);
    } else {//from ww w .  j a  v  a2 s.co m
        logger.debug("Zset Score could not be determined. Using default score of 1");
        zset.add(objectToAdd);
    }
}