net.sf.ehcache.Ehcache.isSampledStatisticsEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(274)

本文整理了Java中net.sf.ehcache.Ehcache.isSampledStatisticsEnabled()方法的一些代码示例,展示了Ehcache.isSampledStatisticsEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ehcache.isSampledStatisticsEnabled()方法的具体详情如下:
包路径:net.sf.ehcache.Ehcache
类名称:Ehcache
方法名:isSampledStatisticsEnabled

Ehcache.isSampledStatisticsEnabled介绍

[英]Returns if sampled statistics collection is enabled or disabled
[中]如果已启用或禁用采样统计信息收集,则返回

代码示例

代码示例来源:origin: net.sf.ehcache/ehcache-explicitlocking

  1. /**
  2. * {@inheritDoc}
  3. *
  4. * @see net.sf.ehcache.Ehcache#isSampledStatisticsEnabled()
  5. */
  6. public boolean isSampledStatisticsEnabled() {
  7. return cache.isSampledStatisticsEnabled();
  8. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public boolean isSampledStatisticsEnabled() {
  5. return underlyingCache.isSampledStatisticsEnabled();
  6. }

代码示例来源:origin: com.madgag/mini-git-server-server

  1. public boolean isSampledStatisticsEnabled() {
  2. return self.isSampledStatisticsEnabled();
  3. }

代码示例来源:origin: rtyley/mini-git-server

  1. public boolean isSampledStatisticsEnabled() {
  2. return self.isSampledStatisticsEnabled();
  3. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public boolean isSampledStatisticsEnabled() {
  5. // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  6. Thread t = Thread.currentThread();
  7. ClassLoader prev = t.getContextClassLoader();
  8. t.setContextClassLoader(this.classLoader);
  9. try {
  10. return this.cache.isSampledStatisticsEnabled();
  11. } finally {
  12. t.setContextClassLoader(prev);
  13. }
  14. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void enableSampledStatistics() {
  5. if (!cache.isSampledStatisticsEnabled()) {
  6. try {
  7. cache.setSampledStatisticsEnabled(true);
  8. } catch (RuntimeException e) {
  9. throw Utils.newPlainException(e);
  10. }
  11. }
  12. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void disableSampledStatistics() {
  5. if (cache.isSampledStatisticsEnabled()) {
  6. try {
  7. cache.setSampledStatisticsEnabled(false);
  8. } catch (RuntimeException e) {
  9. throw Utils.newPlainException(e);
  10. }
  11. }
  12. }

代码示例来源:origin: org.terracotta/ehcache-probe

  1. @RestMethod
  2. public void getCacheStatisticsState(RestResponse response)
  3. throws IOException {
  4. Object result = Boolean.TRUE;
  5. for (String cacheName : cacheManager.getCacheNames()) {
  6. Ehcache cache = cacheManager.getEhcache(cacheName);
  7. if (cache != null) {
  8. try {
  9. if (!cache.isSampledStatisticsEnabled()) {
  10. result = Boolean.FALSE;
  11. break;
  12. }
  13. } catch (NoSuchMethodError e) {
  14. result = "na";
  15. break;
  16. }
  17. }
  18. }
  19. response.value(result.toString());
  20. }

相关文章

Ehcache类方法