本文整理了Java中net.sf.ehcache.Cache.getDiskStoreSize()
方法的一些代码示例,展示了Cache.getDiskStoreSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Cache.getDiskStoreSize()
方法的具体详情如下:
包路径:net.sf.ehcache.Cache
类名称:Cache
方法名:getDiskStoreSize
[英]Returns the number of elements in the disk store.
[中]返回磁盘存储中的元素数。
代码示例来源:origin: hibernate/hibernate
public long getElementCountOnDisk() {
return cache.getDiskStoreSize();
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
public long getElementCountOnDisk() {
return cache.getDiskStoreSize();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*
* @see net.sf.ehcache.hibernate.management.api.EhcacheStats#getNumberOfElementsOnDisk(java.lang.String)
*/
public int getNumberOfElementsOnDisk(String region) {
Cache cache = this.cacheManager.getCache(region);
if (cache != null) {
return cache.getDiskStoreSize();
} else {
return -1;
}
}
代码示例来源:origin: org.gatein.shindig/shindig-common
/**
* @return The current size of the cache.
*
* Note that this does not call getSize on the underlying cache, which is very expensive. This
* will not include the size of remote caches.
*/
public long getSize() {
return cache.getMemoryStoreSize() + cache.getDiskStoreSize();
}
}
代码示例来源:origin: org.apache.shindig/shindig-common
/**
* @return The current size of the cache.
*
* Note that this does not call getSize on the underlying cache, which is very expensive. This
* will not include the size of remote caches.
*/
public long getSize() {
return cache.getMemoryStoreSize() + cache.getDiskStoreSize();
}
}
代码示例来源:origin: com.lmco.shindig/shindig-common
/**
* @return The current size of the cache.
*
* Note that this does not call getSize on the underlying cache, which is very expensive. This
* will not include the size of remote caches.
*/
public long getSize() {
return cache.getMemoryStoreSize() + cache.getDiskStoreSize();
}
}
代码示例来源:origin: apache/shindig
/**
* @return The current size of the cache.
*
* Note that this does not call getSize on the underlying cache, which is very expensive. This
* will not include the size of remote caches.
*/
public long getSize() {
return cache.getMemoryStoreSize() + cache.getDiskStoreSize();
}
}
代码示例来源:origin: org.wso2.org.apache.shindig/shindig-common
/**
* @return The current size of the cache.
*
* Note that this does not call getSize on the underlying cache, which is very expensive. This
* will not include the size of remote caches.
*/
public long getSize() {
return cache.getMemoryStoreSize() + cache.getDiskStoreSize();
}
}
代码示例来源:origin: org.apache.portals.jetspeed-2/jetspeed-cm
state.setDiskStoreSize(cache.getDiskStoreSize());
state.setAverageGetTime(statistics.getAverageGetTime());
state.setCacheHits(statistics.getCacheHits());
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
* <p/>
* Note, the {@link #getSize} method will have the same value as the size
* reported by Statistics for the statistics accuracy of
* {@link Statistics#STATISTICS_ACCURACY_BEST_EFFORT}.
*/
public Statistics getStatistics() throws IllegalStateException {
int size = getSizeBasedOnAccuracy(getLiveCacheStatistics()
.getStatisticsAccuracy());
return new Statistics(this, getLiveCacheStatistics()
.getStatisticsAccuracy(), getLiveCacheStatistics()
.getCacheHitCount(), getLiveCacheStatistics()
.getOnDiskHitCount(), getLiveCacheStatistics()
.getOffHeapHitCount(), getLiveCacheStatistics()
.getInMemoryHitCount(), getLiveCacheStatistics()
.getCacheMissCount(), getLiveCacheStatistics()
.getOnDiskMissCount(), getLiveCacheStatistics()
.getOffHeapMissCount(), getLiveCacheStatistics()
.getInMemoryMissCount(), size, getAverageGetTime(),
getLiveCacheStatistics().getEvictedCount(),
getMemoryStoreSize(), getOffHeapStoreSize(), getDiskStoreSize(),
getSearchesPerSecond(), getAverageSearchTime(), getLiveCacheStatistics().getWriterQueueLength());
}
内容来源于网络,如有侵权,请联系作者删除!