}
}
}
public Map<String, String> stats() {
Transport transport = transportFactory.getTransport();
try {
// 1) write header
long messageId = HotRodOperationsHelper.writeHeader(transport, STATS_REQUEST, cacheName, topologyId);
HotRodOperationsHelper.readHeaderAndValidate(transport, messageId, STATS_RESPONSE, topologyId);
int nrOfStats = transport.readVInt();
Map<String, String> result = new HashMap<String, String>();
for (int i = 0; i < nrOfStats; i++) {
String statName = transport.readString();
String statValue = transport.readString();
result.put(statName, statValue);
}
return result;
} finally {
releaseTransport(transport);