Example usage for org.springframework.data.redis.core ListOperations rightPushAll

List of usage examples for org.springframework.data.redis.core ListOperations rightPushAll

Introduction

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

Prototype

@Nullable
Long rightPushAll(K key, Collection<V> values);

Source Link

Document

Append values to key .

Usage

From source file:com.company.project.service.dao.RedisDao.java

/**
 * Push a list to the right of list//from ww  w.  j av a2  s.  c  o  m
 * - TODO unable to use "opsForList.trim(key, start, end)".
 * - use opsForList.leftPop(key) or opsForList.rightPop(key)
 * @param key
 * @param listValues 
 */
public long rightPushAllList(String key, Object... listValues) {
    ListOperations opsForList = redisTemplate.opsForList();
    return opsForList.rightPushAll(key, listValues);
}