Example usage for org.springframework.data.redis.core RedisTemplate boundZSetOps

List of usage examples for org.springframework.data.redis.core RedisTemplate boundZSetOps

Introduction

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

Prototype

@Override
    public BoundZSetOperations<K, V> boundZSetOps(K key) 

Source Link

Usage

From source file:org.shareok.data.redis.UserDaoImpl.java

@Transactional
public void test2() {
    RedisTemplate<String, Object> redis = new RedisTemplate<>();
    redis.setConnectionFactory(connectionFactory);
    //        redis.setKeySerializer(ApplicationConfig.StringSerializer.INSTANCE);
    //        redis.setValueSerializer(new JacksonJsonRedisSerializer<User>(UserDaoImpl.class));
    redis.afterPropertiesSet();//from   w  w w  . j  a va  2 s.  co m
    redis.setEnableTransactionSupport(true);//???redistemplate?
    redis.multi();
    redis.boundValueOps("somevkey").increment(1);
    redis.boundZSetOps("somezkey").add("zvalue", 11);
    redis.exec();
    redis.setEnableTransactionSupport(false);
}