org.hibernate.stat.Statistics.getSecondLevelCacheHitCount()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(157)

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

Statistics.getSecondLevelCacheHitCount介绍

[英]Global number of cacheable entities/collections successfully retrieved from the cache
[中]从缓存中成功检索的可缓存实体/集合的全局数量

代码示例

代码示例来源:origin: hibernate/hibernate-orm

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics( getEntityManagerFactory( args ) );
    return Long.valueOf( statistics != null ? statistics.getSecondLevelCacheHitCount() : 0 );
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getSecondLevelCacheHitCount() : 0);
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getSecondLevelCacheHitCount() : 0);
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getSecondLevelCacheHitCount() : 0);
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getSecondLevelCacheHitCount() : 0);
  }
};

代码示例来源:origin: gocd/gocd

json.put("FlushCount", statistics.getFlushCount());
json.put("ConnectCount", statistics.getConnectCount());
json.put("SecondLevelCacheHitCount", statistics.getSecondLevelCacheHitCount());
json.put("SecondLevelCacheMissCount", statistics.getSecondLevelCacheMissCount());
json.put("SecondLevelCachePutCount", statistics.getSecondLevelCachePutCount());

代码示例来源:origin: prometheus/client_java

@Override
 public double getValue(Statistics statistics) {
  return statistics.getSecondLevelCacheHitCount();
 }
}

代码示例来源:origin: hibernate/hibernate-orm

s.close();
assertEquals(0L, statistics.getSecondLevelCacheHitCount());
assertEquals(0L, statistics.getSecondLevelCacheMissCount());
assertEquals(0L, statistics.getSecondLevelCachePutCount());
s.close();
assertEquals(0, statistics.getSecondLevelCacheHitCount());
assertEquals(0, statistics.getSecondLevelCacheMissCount());
assertEquals(0, statistics.getSecondLevelCachePutCount());
s.close();
assertEquals( 0, statistics.getSecondLevelCacheHitCount());
assertEquals( 1, statistics.getSecondLevelCacheMissCount() );
assertEquals( 0, statistics.getSecondLevelCachePutCount() );

代码示例来源:origin: hibernate/hibernate-orm

} );
assertEquals( 0, statistics.getSecondLevelCacheHitCount() );
assertEquals( 3, statistics.getSecondLevelCachePutCount() );
assertEquals( 1, sqlStatementInterceptor.getSqlQueries().size() );
assertEquals( 3, statistics.getSecondLevelCacheHitCount() );
assertEquals( 0, sqlStatementInterceptor.getSqlQueries().size() );

代码示例来源:origin: hibernate/hibernate

/**
 * @see StatisticsServiceMBean#getSecondLevelCacheHitCount()
 */
public long getSecondLevelCacheHitCount() {
  return stats.getSecondLevelCacheHitCount();
}
/**

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

/**
 * @see StatisticsServiceMBean#getSecondLevelCacheHitCount()
 */
public long getSecondLevelCacheHitCount() {
  return stats.getSecondLevelCacheHitCount();
}
/**

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

/**
 * @see StatisticsServiceMBean#getSecondLevelCacheHitCount()
 */
public long getSecondLevelCacheHitCount() {
  return stats.getSecondLevelCacheHitCount();
}
/**

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

/**
 * @see StatisticsServiceMBean#getSecondLevelCacheHitCount()
 */
public long getSecondLevelCacheHitCount() {
  return stats.getSecondLevelCacheHitCount();
}
/**

代码示例来源:origin: org.jboss.as/jboss-as-jpa-hibernate4

@Override
  void handle(final ModelNode response, final String name, ManagementLookup stats, OperationContext context) {
    response.set(stats.getStatistics().getSecondLevelCacheHitCount());
  }
});

代码示例来源:origin: org.jboss.eap/jipijapa-hibernate5-3

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getSecondLevelCacheHitCount() : 0);
  }
};

代码示例来源:origin: org.jipijapa/jipijapa-hibernate4-3

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getSecondLevelCacheHitCount() : 0);
  }
};

代码示例来源:origin: org.jipijapa/jipijapa-hibernate4-1

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getSecondLevelCacheHitCount() : 0);
  }
};

代码示例来源:origin: org.jboss.eap/jipijapa-hibernate4-3

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getSecondLevelCacheHitCount() : 0);
  }
};

代码示例来源:origin: org.jboss.eap/jipijapa-hibernate5

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return Long.valueOf(statistics != null ? statistics.getSecondLevelCacheHitCount() : 0);
  }
};

代码示例来源:origin: com.springsource.insight/insight-repo

private void addSecondLevelCacheStats(List<ApplicationStat> res, Statistics stats) {
  addCacheStat(res, "2Cache/total/", stats.getSecondLevelCacheHitCount(), stats.getSecondLevelCacheMissCount(), stats.getSecondLevelCachePutCount());
  
  for (String cacheRegion : stats.getSecondLevelCacheRegionNames()) {
    SecondLevelCacheStatistics cStats = stats.getSecondLevelCacheStatistics(cacheRegion);
    addCacheStat(res, "2Cache/" + cacheRegion + "/", cStats.getHitCount(), cStats.getMissCount(), cStats.getPutCount());
    addStat(res, "2Cache/" + cacheRegion + "/size", cStats.getElementCountInMemory(),
        "onDisk=" + cStats.getElementCountOnDisk() + ", memSize=" + cStats.getSizeInMemory());
  }
}

相关文章

Statistics类方法