本文整理汇总了Java中net.sf.ehcache.Ehcache.getSize方法的典型用法代码示例。如果您正苦于以下问题:Java Ehcache.getSize方法的具体用法?Java Ehcache.getSize怎么用?Java Ehcache.getSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.ehcache.Ehcache
的用法示例。
在下文中一共展示了Ehcache.getSize方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: size
import net.sf.ehcache.Ehcache; //导入方法依赖的package包/类
@Override
public int size() {
if (springCache.getNativeCache() instanceof Ehcache) {
Ehcache ehcache = (Ehcache) springCache.getNativeCache();
return ehcache.getSize();
}
throw new UnsupportedOperationException(
"invoke spring cache abstract size method not supported");
}
示例2: size
import net.sf.ehcache.Ehcache; //导入方法依赖的package包/类
@Override
public int size() {
if(springCache.getNativeCache() instanceof Ehcache) {
Ehcache ehcache = (Ehcache) springCache.getNativeCache();
return ehcache.getSize();
}
throw new UnsupportedOperationException("invoke spring cache abstract size method not supported");
}
示例3: size
import net.sf.ehcache.Ehcache; //导入方法依赖的package包/类
public int size() {
if(cache.getNativeCache() instanceof Ehcache) {
Ehcache ehcache = (Ehcache) cache.getNativeCache();
return ehcache.getSize();
}
throw new UnsupportedOperationException("invoke spring cache abstract size method not supported");
}
示例4: size
import net.sf.ehcache.Ehcache; //导入方法依赖的package包/类
@Override
public int size() {
if (springCache.getNativeCache() instanceof Ehcache) {
Ehcache ehcache = (Ehcache) springCache.getNativeCache();
return ehcache.getSize();
}
throw new UnsupportedOperationException("invoke spring cache abstract size method not supported");
}
示例5: getCacheSize
import net.sf.ehcache.Ehcache; //导入方法依赖的package包/类
public int getCacheSize() {
int cacheSize = 0;
String[] cacheNames = cacheManager.getCacheNames();
if (cacheNames != null) {
for (String cacheName : cacheNames) {
Ehcache cache = cacheManager.getEhcache(cacheName);
if (cache != null) {
cacheSize += cache.getSize();
}
}
}
return cacheSize;
}
示例6: size
import net.sf.ehcache.Ehcache; //导入方法依赖的package包/类
public int size() {
if(springCache.getNativeCache() instanceof Ehcache) {
Ehcache ehcache = (Ehcache) springCache.getNativeCache();
return ehcache.getSize();
}
throw new UnsupportedOperationException("invoke spring cache abstract size method not supported");
}