com.github.zhengframework.cache.CacheResolverFactoryProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zheng-cache Show documentation
Show all versions of zheng-cache Show documentation
zheng framework module: cache support
package com.github.zhengframework.cache;
import javax.cache.CacheManager;
import javax.cache.annotation.CacheResolverFactory;
import javax.inject.Inject;
import javax.inject.Provider;
import org.jsr107.ri.annotations.DefaultCacheResolverFactory;
public class CacheResolverFactoryProvider implements Provider {
private final CacheManager cacheManager;
@Inject
public CacheResolverFactoryProvider(CacheManager cacheManager) {
this.cacheManager = cacheManager;
}
@Override
public CacheResolverFactory get() {
return new DefaultCacheResolverFactory(cacheManager);
}
}