本文整理了Java中net.sf.ehcache.Ehcache.setStatisticsEnabled()
方法的一些代码示例,展示了Ehcache.setStatisticsEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ehcache.setStatisticsEnabled()
方法的具体详情如下:
包路径:net.sf.ehcache.Ehcache
类名称:Ehcache
方法名:setStatisticsEnabled
[英]Enable/disable statistics collection. Enabling statistics does not have any effect on sampled statistics. To enable sampled statistics, use #setSampledStatisticsEnabled(boolean) with parameter true. Disabling statistics also disables the sampled statistics collection if it is enabled
[中]启用/禁用统计信息收集。启用统计信息对抽样统计信息没有任何影响。要启用采样统计信息,请将#setSampledStatisticsEnabled(布尔)与参数true一起使用。禁用统计信息还会禁用采样统计信息集合(如果已启用)
代码示例来源:origin: stagemonitor/stagemonitor
/**
* You can use this method to manually register a {@link Cache} that should be monitored by stagemonitor.
* <p>
* Example:
* <pre>
* Stagemonitor.getPlugin(EhCachePlugin.class).monitorCache(yourCache);
* </pre>
*
* @param cache The Cache to monitor
*/
public void monitorCache(Ehcache cache) {
if (this.isInitialized()) {
cache.setStatisticsEnabled(true);
final StagemonitorCacheUsageListener cacheUsageListener = new StagemonitorCacheUsageListener(cache.getName(),
metricRegistry, timeGet.getValue());
cache.registerCacheUsageListener(cacheUsageListener);
metricRegistry.registerAny(new EhCacheMetricSet(cache.getName(), cache, cacheUsageListener));
}
}
代码示例来源:origin: net.sf.ehcache/ehcache-explicitlocking
/**
* {@inheritDoc}
*/
public void setSampledStatisticsEnabled(boolean enabledStatistics) {
cache.setStatisticsEnabled(enabledStatistics);
}
代码示例来源:origin: com.madgag/mini-git-server-server
public void setStatisticsEnabled(boolean enableStatistics) {
self.setStatisticsEnabled(enableStatistics);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public void setStatisticsEnabled(boolean enableStatistics) {
underlyingCache.setStatisticsEnabled(enableStatistics);
}
代码示例来源:origin: net.sf.ehcache/ehcache-explicitlocking
/**
* {@inheritDoc}
*/
public void setStatisticsEnabled(boolean enabledStatistics) {
cache.setStatisticsEnabled(enabledStatistics);
}
代码示例来源:origin: rtyley/mini-git-server
public void setStatisticsEnabled(boolean enableStatistics) {
self.setStatisticsEnabled(enableStatistics);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public void setStatisticsEnabled(boolean arg0) {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
this.cache.setStatisticsEnabled(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public void enableStatistics() {
if (!cache.isStatisticsEnabled()) {
try {
cache.setSampledStatisticsEnabled(true);
cache.setStatisticsEnabled(true);
} catch (RuntimeException e) {
throw Utils.newPlainException(e);
}
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public void disableStatistics() {
if (cache.isStatisticsEnabled()) {
try {
cache.setSampledStatisticsEnabled(false);
cache.setStatisticsEnabled(false);
} catch (RuntimeException e) {
throw Utils.newPlainException(e);
}
}
}
代码示例来源:origin: sakaiproject/sakai
rawCache.setStatisticsEnabled(true);
代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl
cache.setStatisticsEnabled(enabled);
cache.setStatisticsEnabled(configuration.isStatisticsEnabled());
log.info("Configured ehcache (" + name + ") from inputs: " + configuration);
内容来源于网络,如有侵权,请联系作者删除!