Example usage for org.springframework.data.redis.core BoundZSetOperations incrementScore

List of usage examples for org.springframework.data.redis.core BoundZSetOperations incrementScore

Introduction

In this page you can find the example usage for org.springframework.data.redis.core BoundZSetOperations incrementScore.

Prototype

@Nullable
Double incrementScore(V value, double delta);

Source Link

Document

Increment the score of element with value in sorted set by increment .

Usage

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

private void doIncrementOrOverwrite(final BoundZSetOperations<String, Object> ops, Object object, Double score,
        boolean increment) {
    if (increment) {
        ops.incrementScore(object, score);
    } else {/*  w  w  w .j a v a2 s  .c om*/
        ops.add(object, score);
    }
}