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

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

Introduction

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

Prototype

@Nullable
Long leftPush(K key, V value);

Source Link

Document

Prepend value to key .

Usage

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

/**
 * Push a value to the left of list//from  w w w . j a  va 2s.  c o m
 * @param key
 * @param value 
 */
public void leftPushToList(String key, String value) {
    ListOperations opsForList = redisTemplate.opsForList();
    opsForList.leftPush(key, value);
}