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

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

Introduction

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

Prototype

@Nullable
V leftPop(K key);

Source Link

Document

Removes and returns first element in list stored at key .

Usage

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

/**
* Pop a value from left of list//  ww w .ja v a  2 s  .  com
* @param key
* @return left most element of the list
*/
public Object leftPopFromList(String key) {
    ListOperations opsForList = redisTemplate.opsForList();
    return opsForList.leftPop(key);
}