本文整理汇总了Java中net.sf.ehcache.store.MemoryStoreEvictionPolicy.fromString方法的典型用法代码示例。如果您正苦于以下问题:Java MemoryStoreEvictionPolicy.fromString方法的具体用法?Java MemoryStoreEvictionPolicy.fromString怎么用?Java MemoryStoreEvictionPolicy.fromString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.ehcache.store.MemoryStoreEvictionPolicy
的用法示例。
在下文中一共展示了MemoryStoreEvictionPolicy.fromString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: open
import net.sf.ehcache.store.MemoryStoreEvictionPolicy; //导入方法依赖的package包/类
public void open() {
Cache configCache = new Cache(
getName(),
getMaxElementsInMemory(),
MemoryStoreEvictionPolicy.fromString(getMemoryStoreEvictionPolicy()),
isOverflowToDisk(),
null,
isEternal(),
getTimeToLiveSeconds(),
getTimeToIdleSeconds(),
isDiskPersistent(),
getDiskExpiryThreadIntervalSeconds(),
null,
null,
getMaxElementsOnDisk()
);
cacheManager=IbisCacheManager.getInstance();
cache = cacheManager.addCache(configCache);
}
示例2: toPolicy
import net.sf.ehcache.store.MemoryStoreEvictionPolicy; //导入方法依赖的package包/类
@Converter
public static MemoryStoreEvictionPolicy toPolicy(String s) {
if (s == null) {
return null;
}
s = s.replace("MemoryStoreEvictionPolicy.", "");
return MemoryStoreEvictionPolicy.fromString(s);
}
示例3: createCache
import net.sf.ehcache.store.MemoryStoreEvictionPolicy; //导入方法依赖的package包/类
private void createCache(AppConstants ac) {
if (isDiskPersistent() && !isOverflowToDisk()) {
log.info("setting overflowToDisk true, to support diskPersistent=true");
setOverflowToDisk(true);
}
String DiskStorePath = null;
String cacheDir = ac.getResolvedProperty("etag.ehcache.dir");
if (StringUtils.isNotEmpty(cacheDir)) {
DiskStorePath = cacheDir;
}
Cache configCache = new Cache(
KEY_CACHE_NAME,
maxElementsInMemory,
MemoryStoreEvictionPolicy.fromString(memoryStoreEvictionPolicy),
isOverflowToDisk(),
DiskStorePath,
isEternal(),
0,
0,
isDiskPersistent(),
diskExpiryThreadIntervalSeconds,
null,
null,
getMaxElementsOnDisk()
);
cache = cacheManager.addCache(configCache);
}
示例4: configure
import net.sf.ehcache.store.MemoryStoreEvictionPolicy; //导入方法依赖的package包/类
public void configure(String ownerName) throws ConfigurationException {
super.configure(ownerName);
if (isDiskPersistent() && !isOverflowToDisk()) {
log.info("setting overflowToDisk true, to support diskPersistent=true");
setOverflowToDisk(true);
}
MemoryStoreEvictionPolicy.fromString(getMemoryStoreEvictionPolicy());
}