All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.yelong.support.redis.jedis.DefaultJedisCacheManagerImpl Maven / Gradle / Ivy

Go to download

对各种开源框架的包装、支持、拓展。这里也包含的yelong-core与orm框架的整合。 默认对所有依赖为 scope 为 provided 。您需要针对自己的需要进行再次依赖

There is a newer version: 2.2.0
Show newest version
/**
 * 
 */
package org.yelong.support.redis.jedis;

import org.yelong.core.annotation.Nullable;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

/**
 * 默认的Jedis缓存管理器实现
 * 
 * @author PengFei
 * @since 1.3.0
 */
public class DefaultJedisCacheManagerImpl extends BaseJedisCacheManager {

	private final JedisPool jedisPool;

	protected DefaultJedisCacheManagerImpl(@Nullable String keyPrefix, @Nullable String name, final JedisPool jedisPool,
			ObjectToJson objectToJson, JsonToObject jsonToObject) {
		super(keyPrefix, name, objectToJson, jsonToObject);
		this.jedisPool = jedisPool;
	}

	@Override
	protected Jedis getJedis() {
		return jedisPool.getResource();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy