Example usage for org.springframework.data.redis.core BoundListOperations rightPush

List of usage examples for org.springframework.data.redis.core BoundListOperations rightPush

Introduction

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

Prototype

@Nullable
Long rightPush(V value);

Source Link

Document

Append value to the bound key.

Usage

From source file:org.shareok.data.redis.job.JobQueueDaoImpl.java

@Override
public void addJobIntoQueue(long jobId, String queueName) {
    try {//from   ww w .  ja v  a2s .c  o m
        BoundListOperations<String, String> jobQueueOps = (BoundListOperations<String, String>) redisTemplate
                .boundListOps(queueName);
        jobQueueOps.rightPush(String.valueOf(jobId));
    } catch (Exception ex) {
        logger.error("Cannot add job " + String.valueOf(jobId) + " into " + queueName, ex);
    }
}