org.xson.web.cache.helper.RedisCacheHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xco-web Show documentation
Show all versions of xco-web Show documentation
xco-web is an easy to use control layer framework, is part of the SOA system, using xml language to describe the controller.
The newest version!
package org.xson.web.cache.helper;
import java.util.Map;
import org.xson.thirdparty.redis.JedisClient;
import org.xson.web.Container;
import org.xson.web.cache.RedisCache;
import org.xson.web.cache.vo.CacheVo;
public class RedisCacheHelper {
/**
* 从系统容器中获取JedisClient实例
*
* @param cacheId
* @return
*/
public static JedisClient getJedisClient(String cacheId) {
Map cacheVoMap = Container.getInstance().getCacheVoMap();
CacheVo cacheVo = cacheVoMap.get(cacheId);
if (null != cacheVo) {
RedisCache redisCache = (RedisCache) cacheVo.getCache();
return redisCache.getClient();
}
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy