);
}
else
{
Metric txMetric = new Metric(
payload.get("completed-transaction-count").asLong(),
payload.get("successful-transaction-count").asLong()
);
// ----
Metric queryExecMetric = new Metric(
payload.get("query-execution-count").asLong(),
payload.get("query-execution-max-time").asLong()
);
queryExecMetric.add(
payload.get("query-execution-max-time-query-string").asString()
);
// ----
Metric queryCacheMetric = new Metric(
payload.get("query-cache-put-count").asLong(),
payload.get("query-cache-hit-count").asLong(),
payload.get("query-cache-miss-count").asLong()
);
// ----
Metric secondLevelCacheMetric = new Metric(
payload.get("second-level-cache-put-count").asLong(),
payload.get("second-level-cache-hit-count").asLong(),
payload.get("second-level-cache-miss-count").asLong()
);
Metric connectionMetric = new Metric(
payload.get("connect-count").asLong(),
payload.get("session-open-count").asLong(),
payload.get("session-close-count").asLong()
);