use of com.hazelcast.map.impl.LocalMapStatsProvider in project hazelcast by hazelcast.
the class EntryOperation method getLocalMapStats.
private LocalMapStatsImpl getLocalMapStats() {
final MapServiceContext mapServiceContext = mapService.getMapServiceContext();
final LocalMapStatsProvider localMapStatsProvider = mapServiceContext.getLocalMapStatsProvider();
return localMapStatsProvider.getLocalMapStatsImpl(name);
}
use of com.hazelcast.map.impl.LocalMapStatsProvider in project hazelcast by hazelcast.
the class ContainsValueOperation method run.
@Override
public void run() {
contains = recordStore.containsValue(testValue);
if (mapContainer.getMapConfig().isStatisticsEnabled()) {
LocalMapStatsProvider localMapStatsProvider = mapServiceContext.getLocalMapStatsProvider();
localMapStatsProvider.getLocalMapStatsImpl(name).incrementOtherOperations();
}
}
use of com.hazelcast.map.impl.LocalMapStatsProvider in project hazelcast by hazelcast.
the class MapSizeOperation method run.
@Override
public void run() {
recordStore.checkIfLoaded();
size = recordStore.size();
if (mapContainer.getMapConfig().isStatisticsEnabled()) {
LocalMapStatsProvider localMapStatsProvider = mapServiceContext.getLocalMapStatsProvider();
LocalMapStatsImpl localMapStatsImpl = localMapStatsProvider.getLocalMapStatsImpl(name);
localMapStatsImpl.incrementOtherOperations();
}
}
use of com.hazelcast.map.impl.LocalMapStatsProvider in project hazelcast by hazelcast.
the class MapClearMessageTask method reduce.
@Override
protected Object reduce(Map<Integer, Object> map) {
int clearedTotal = 0;
for (Object affectedEntries : map.values()) {
clearedTotal += (Integer) affectedEntries;
}
MapService service = getService(MapService.SERVICE_NAME);
MapServiceContext mapServiceContext = service.getMapServiceContext();
if (clearedTotal > 0) {
Address thisAddress = nodeEngine.getThisAddress();
MapEventPublisher mapEventPublisher = mapServiceContext.getMapEventPublisher();
mapEventPublisher.publishMapEvent(thisAddress, parameters, CLEAR_ALL, clearedTotal);
}
final MapService mapService = getService(MapService.SERVICE_NAME);
MapContainer mapContainer = mapService.getMapServiceContext().getMapContainer(parameters);
if (mapContainer.getMapConfig().isStatisticsEnabled()) {
LocalMapStatsProvider localMapStatsProvider = mapServiceContext.getLocalMapStatsProvider();
localMapStatsProvider.getLocalMapStatsImpl(parameters).incrementOtherOperations();
}
return null;
}
use of com.hazelcast.map.impl.LocalMapStatsProvider in project hazelcast by hazelcast.
the class MapContainsKeyMessageTask method processResponseBeforeSending.
@Override
protected Object processResponseBeforeSending(Object response) {
MapService mapService = getService(MapService.SERVICE_NAME);
MapContainer mapContainer = mapService.getMapServiceContext().getMapContainer(parameters.name);
if (mapContainer.getMapConfig().isStatisticsEnabled()) {
LocalMapStatsProvider localMapStatsProvider = mapService.getMapServiceContext().getLocalMapStatsProvider();
localMapStatsProvider.getLocalMapStatsImpl(parameters.name).incrementOtherOperations();
}
return super.processResponseBeforeSending(response);
}
Aggregations