@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityUpdateCount() : 0); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics( getEntityManagerFactory( args ) ); return Long.valueOf( statistics != null ? statistics.getEntityUpdateCount() : 0 ); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityUpdateCount() : 0); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityUpdateCount() : 0); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityUpdateCount() : 0); } };
json.put("EntityLoadCount", statistics.getEntityLoadCount()); json.put("EntityFetchCount", statistics.getEntityFetchCount()); json.put("EntityUpdateCount", statistics.getEntityUpdateCount()); json.put("QueryExecutionCount", statistics.getQueryExecutionCount()); json.put("QueryExecutionMaxTime", statistics.getQueryExecutionMaxTime());
session.getTransaction().commit(); session.close(); assertEquals( 0, sf.getStatistics().getEntityUpdateCount() );
session.getTransaction().commit(); session.close(); assertEquals( 0, sf.getStatistics().getEntityUpdateCount() );
@Override public double getValue(Statistics statistics) { return statistics.getEntityUpdateCount(); } }
/** * @see StatisticsServiceMBean#getEntityUpdateCount() */ public long getEntityUpdateCount() { return stats.getEntityUpdateCount(); } /**
/** * @see StatisticsServiceMBean#getEntityUpdateCount() */ public long getEntityUpdateCount() { return stats.getEntityUpdateCount(); } /**
/** * @see StatisticsServiceMBean#getEntityUpdateCount() */ public long getEntityUpdateCount() { return stats.getEntityUpdateCount(); } /**
/** * @see StatisticsServiceMBean#getEntityUpdateCount() */ public long getEntityUpdateCount() { return stats.getEntityUpdateCount(); } /**
@Override void handle(final ModelNode response, final String name, ManagementLookup stats, OperationContext context) { response.set(stats.getStatistics().getEntityUpdateCount()); } });
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityUpdateCount() : 0); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityUpdateCount() : 0); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityUpdateCount() : 0); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityUpdateCount() : 0); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityUpdateCount() : 0); } };
private void addEntityStats(List<ApplicationStat> res, Statistics stats) { addStat(res, "entity/total/deletes", stats.getEntityDeleteCount()); addStat(res, "entity/total/fetches", stats.getEntityFetchCount()); addStat(res, "entity/total/inserts", stats.getEntityInsertCount()); addStat(res, "entity/total/loads", stats.getEntityLoadCount()); addStat(res, "entity/total/updates", stats.getEntityUpdateCount()); for (String entityName : stats.getEntityNames()) { EntityStatistics entStats = stats.getEntityStatistics(entityName); addStat(res, "entity/" + entityName + "/deletes", entStats.getDeleteCount()); addStat(res, "entity/" + entityName + "/fetches", entStats.getFetchCount()); addStat(res, "entity/" + entityName + "/inserts", entStats.getInsertCount()); addStat(res, "entity/" + entityName + "/loads", entStats.getLoadCount()); addStat(res, "entity/" + entityName + "/updates", entStats.getUpdateCount()); } }