use of com.hazelcast.monitor.LocalMapStats in project hazelcast by hazelcast.
the class NearCachedClientMapProxy method getLocalMapStats.
@Override
public LocalMapStats getLocalMapStats() {
LocalMapStats localMapStats = super.getLocalMapStats();
NearCacheStats nearCacheStats = nearCache.getNearCacheStats();
((LocalMapStatsImpl) localMapStats).setNearCacheStats(nearCacheStats);
return localMapStats;
}
use of com.hazelcast.monitor.LocalMapStats in project hazelcast by hazelcast.
the class LocalMapStatsUnderOnGoingClientUpdateTest method stats_generated_when_member_restarted_under_ongoing_client_update.
@Test
public void stats_generated_when_member_restarted_under_ongoing_client_update() throws Exception {
IMap map = client.getMap(mapName);
member.shutdown();
member = factory.newHazelcastInstance();
map.put(1, 1);
map.put(2, 2);
// get internal StatisticsAwareService.
MapService mapService = getNodeEngineImpl(member).getService(SERVICE_NAME);
Map<String, LocalMapStats> stats = ((StatisticsAwareService) mapService).getStats();
LocalMapStats localMapStats = stats.get(mapName);
// StatisticsAwareService should give right stats.
assertNotNull("there should be 1 LocalMapStats object", localMapStats);
assertEquals("Owned entry count should be 2", 2, localMapStats.getOwnedEntryCount());
}
Aggregations