@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics( getEntityManagerFactory( args ) ); return Long.valueOf( statistics != null ? statistics.getEntityDeleteCount() : 0 ); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityDeleteCount() : 0); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityDeleteCount() : 0); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityDeleteCount() : 0); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityDeleteCount() : 0); } };
return json; json.put("EntityDeleteCount", statistics.getEntityDeleteCount()); json.put("EntityInsertCount", statistics.getEntityInsertCount()); json.put("EntityLoadCount", statistics.getEntityLoadCount());
@Override public double getValue(Statistics statistics) { return statistics.getEntityDeleteCount(); } }
/** * @see StatisticsServiceMBean#getEntityDeleteCount() */ public long getEntityDeleteCount() { return stats.getEntityDeleteCount(); } /**
/** * @see StatisticsServiceMBean#getEntityDeleteCount() */ public long getEntityDeleteCount() { return stats.getEntityDeleteCount(); } /**
/** * @see StatisticsServiceMBean#getEntityDeleteCount() */ public long getEntityDeleteCount() { return stats.getEntityDeleteCount(); } /**
/** * @see StatisticsServiceMBean#getEntityDeleteCount() */ public long getEntityDeleteCount() { return stats.getEntityDeleteCount(); } /**
@Override void handle(final ModelNode response, final String name, ManagementLookup stats, OperationContext context) { response.set(stats.getStatistics().getEntityDeleteCount()); } });
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityDeleteCount() : 0); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityDeleteCount() : 0); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityDeleteCount() : 0); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityDeleteCount() : 0); } };
@Override public Object invoke(Object... args) { org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args)); return Long.valueOf(statistics != null ? statistics.getEntityDeleteCount() : 0); } };
public StatisticData[] retrieveStatisticData() { final List<StatisticData> resultList = new ArrayList<StatisticData>(); for (Map.Entry<String, Statistics> entry : statistics.entrySet()) { final String element = entry.getKey(); final Statistics stats = entry.getValue(); resultList.add(new StatisticData(NAME_DELETE, element, stats.getEntityDeleteCount())); resultList.add(new StatisticData(NAME_FETCH, element, stats.getEntityFetchCount())); resultList.add(new StatisticData(NAME_INSERT, element, stats.getEntityInsertCount())); resultList.add(new StatisticData(NAME_LOAD, element, stats.getEntityLoadCount())); resultList.add(new StatisticData(NAME_UPDATE, element, stats.getEntityUpdateCount())); } if (0 == resultList.size()) { return StatisticData.EMPTY_ARRAY; } final StatisticData[] result = new StatisticData[resultList.size()]; resultList.toArray(result); return result; } }
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()); } }
return stats.getEntityDeleteCount();