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

com.alicp.jetcache.anno.method.SpringCacheContext Maven / Gradle / Ivy

The newest version!
package com.alicp.jetcache.anno.method;

import com.alicp.jetcache.CacheManager;
import com.alicp.jetcache.anno.support.CacheContext;
import com.alicp.jetcache.anno.support.GlobalCacheConfig;
import com.alicp.jetcache.anno.support.SpringConfigProvider;
import org.springframework.context.ApplicationContext;

/**
 * Created on 2016/10/19.
 *
 * @author huangli
 */
public class SpringCacheContext extends CacheContext {

    private ApplicationContext applicationContext;

    public SpringCacheContext(CacheManager cacheManager, SpringConfigProvider configProvider,
                              GlobalCacheConfig globalCacheConfig, ApplicationContext applicationContext) {
        super(cacheManager, configProvider, globalCacheConfig);
        this.applicationContext = applicationContext;
    }

    @Override
    protected CacheInvokeContext newCacheInvokeContext() {
        return new SpringCacheInvokeContext(applicationContext);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy