Example usage for org.springframework.data.redis.core RedisConnectionUtils unbindConnection

List of usage examples for org.springframework.data.redis.core RedisConnectionUtils unbindConnection

Introduction

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

Prototype

public static void unbindConnection(RedisConnectionFactory factory) 

Source Link

Document

Unbinds and closes the connection (if any) associated with the given factory.

Usage

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

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