Example usage for org.springframework.data.redis.core BoundHashOperations increment

List of usage examples for org.springframework.data.redis.core BoundHashOperations increment

Introduction

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

Prototype

@Nullable
Double increment(HK key, double delta);

Source Link

Document

Increment value of a hash key by the given delta at the bound key.

Usage

From source file:com.chessix.vas.service.RedisStorage.java

@Override
public void transfer(final String clasId, final String fromAccountId, final String toAccountId,
        final int value) {
    final BoundHashOperations<String, Object, Object> ops = redisTemplate.boundHashOps(clasId);
    ops.increment(fromAccountId, -value);
    ops.increment(toAccountId, value);//  ww w  .j  a  v  a  2s. c o  m
}