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

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

Introduction

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

Prototype

void openPipeline();

Source Link

Document

Activates the pipeline mode for this connection.

Usage

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

private void processInPipeline(PipelineCallback callback) {
    RedisConnection connection = RedisConnectionUtils.bindConnection(redisTemplate.getConnectionFactory());
    try {//from   w  w w.j  a  va 2 s . c  o  m
        connection.openPipeline();
        callback.process();
    } finally {
        connection.closePipeline();
        RedisConnectionUtils.unbindConnection(redisTemplate.getConnectionFactory());
    }
}