本文整理匯總了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");
}