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

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

Introduction

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

Prototype

@Nullable
V rightPop(K key);

Source Link

Document

Removes and returns last element in list stored at key .

Usage

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

/**
 * Pop a value from right of list/*  w ww .  j  ava  2s  .co m*/
 * @param key
 * @return right most element of the list
 */
public Object rightPopFromList(String key) {
    ListOperations opsForList = redisTemplate.opsForList();
    return opsForList.rightPop(key);
}