Example usage for org.springframework.data.redis.connection RedisConnection closePipeline

List of usage examples for org.springframework.data.redis.connection RedisConnection closePipeline

Introduction

In this page you can find the example usage for org.springframework.data.redis.connection RedisConnection closePipeline.

Prototype

List<Object> closePipeline() throws RedisPipelineException;

Source Link

Document

Executes the commands in the pipeline and returns their result.

Usage

From source file:org.springframework.integration.redis.outbound.RedisCollectionPopulatingMessageHandler.java

private void processInPipeline(PipelineCallback callback) {
    RedisConnection connection = RedisConnectionUtils.bindConnection(redisTemplate.getConnectionFactory());
    try {//w  w w  .  java 2  s  .c  om
        connection.openPipeline();
        callback.process();
    } finally {
        connection.closePipeline();
        RedisConnectionUtils.unbindConnection(redisTemplate.getConnectionFactory());
    }
}