本文整理了Java中org.hibernate.stat.Statistics.getSecondLevelCacheMissCount()
方法的一些代码示例,展示了Statistics.getSecondLevelCacheMissCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Statistics.getSecondLevelCacheMissCount()
方法的具体详情如下:
包路径:org.hibernate.stat.Statistics
类名称:Statistics
方法名:getSecondLevelCacheMissCount
[英]Global number of cacheable entities/collections not found in the cache and loaded from the database.
[中]缓存中未找到并从数据库加载的可缓存实体/集合的全局数量。
代码示例来源:origin: hibernate/hibernate-orm
@Override
public Object invoke(Object... args) {
org.hibernate.stat.Statistics statistics = getStatistics( getEntityManagerFactory( args ) );
return Long.valueOf( statistics != null ? statistics.getSecondLevelCacheMissCount() : 0 );
}
};
代码示例来源:origin: wildfly/wildfly
@Override
public Object invoke(Object... args) {
org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
return Long.valueOf(statistics != null ? statistics.getSecondLevelCacheMissCount() : 0);
}
};
代码示例来源:origin: wildfly/wildfly
@Override
public Object invoke(Object... args) {
org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
return Long.valueOf(statistics != null ? statistics.getSecondLevelCacheMissCount() : 0);
}
};
代码示例来源:origin: wildfly/wildfly
@Override
public Object invoke(Object... args) {
org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
return Long.valueOf(statistics != null ? statistics.getSecondLevelCacheMissCount() : 0);
}
};
代码示例来源:origin: wildfly/wildfly
@Override
public Object invoke(Object... args) {
org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
return Long.valueOf(statistics != null ? statistics.getSecondLevelCacheMissCount() : 0);
}
};
代码示例来源:origin: gocd/gocd
json.put("ConnectCount", statistics.getConnectCount());
json.put("SecondLevelCacheHitCount", statistics.getSecondLevelCacheHitCount());
json.put("SecondLevelCacheMissCount", statistics.getSecondLevelCacheMissCount());
json.put("SecondLevelCachePutCount", statistics.getSecondLevelCachePutCount());
json.put("SessionCloseCount", statistics.getSessionCloseCount());
代码示例来源:origin: prometheus/client_java
@Override
public double getValue(Statistics statistics) {
return statistics.getSecondLevelCacheMissCount();
}
}
代码示例来源:origin: hibernate/hibernate-orm
assertEquals(0L, statistics.getSecondLevelCacheMissCount());
assertEquals(0L, statistics.getSecondLevelCachePutCount());
assertFalse(sessionFactory.getCache().containsEntity(PurchaseOrder.class, 1L));
assertEquals(0, statistics.getSecondLevelCacheMissCount());
assertEquals(0, statistics.getSecondLevelCachePutCount());
assertEquals( 1, statistics.getSecondLevelCacheMissCount() );
assertEquals( 0, statistics.getSecondLevelCachePutCount() );
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
/**
* @see StatisticsServiceMBean#getSecondLevelCacheMissCount()
*/
public long getSecondLevelCacheMissCount() {
return stats.getSecondLevelCacheMissCount();
}
/**
代码示例来源:origin: hibernate/hibernate
/**
* @see StatisticsServiceMBean#getSecondLevelCacheMissCount()
*/
public long getSecondLevelCacheMissCount() {
return stats.getSecondLevelCacheMissCount();
}
/**
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
/**
* @see StatisticsServiceMBean#getSecondLevelCacheMissCount()
*/
public long getSecondLevelCacheMissCount() {
return stats.getSecondLevelCacheMissCount();
}
/**
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
/**
* @see StatisticsServiceMBean#getSecondLevelCacheMissCount()
*/
public long getSecondLevelCacheMissCount() {
return stats.getSecondLevelCacheMissCount();
}
/**
代码示例来源: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().getSecondLevelCacheMissCount());
}
});
代码示例来源: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.getSecondLevelCacheMissCount() : 0);
}
};
代码示例来源: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.getSecondLevelCacheMissCount() : 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.getSecondLevelCacheMissCount() : 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.getSecondLevelCacheMissCount() : 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.getSecondLevelCacheMissCount() : 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());
}
}
代码示例来源:origin: org.infinispan/infinispan-hibernate-cache-commons
private void addEntityCheckCache(SessionFactoryImplementor sessionFactory) throws Exception {
Item item = new Item( "chris", "Chris's Item" );
withTxSession(s -> s.persist( item ));
withTxSession(s -> {
Item found = s.load(Item.class, item.getId());
Statistics stats = sessionFactory.getStatistics();
log.info(stats.toString());
assertEquals(item.getDescription(), found.getDescription());
assertEquals(0, stats.getSecondLevelCacheMissCount());
assertEquals(1, stats.getSecondLevelCacheHitCount());
s.delete(found);
});
}
内容来源于网络,如有侵权,请联系作者删除!