use of com.hazelcast.spi.ProxyService in project hazelcast by hazelcast.
the class LocalMapStatsProvider method addStatsOfNoDataIncludedMaps.
/**
* Some maps may have a proxy but no data has been put yet. Think of one created a proxy but not put any data in it.
* By calling this method we are returning an empty stats object for those maps. This is helpful to monitor those kind
* of maps.
*/
private void addStatsOfNoDataIncludedMaps(Map statsPerMap) {
ProxyService proxyService = nodeEngine.getProxyService();
Collection<String> mapNames = proxyService.getDistributedObjectNames(SERVICE_NAME);
for (String mapName : mapNames) {
if (!statsPerMap.containsKey(mapName)) {
statsPerMap.put(mapName, EMPTY_LOCAL_MAP_STATS);
}
}
}
use of com.hazelcast.spi.ProxyService in project hazelcast by hazelcast.
the class AddDistributedObjectListenerMessageTask method call.
@Override
protected Object call() throws Exception {
final ProxyService proxyService = clientEngine.getProxyService();
final String registrationId = proxyService.addProxyListener(this);
endpoint.addDestroyAction(registrationId, new Callable() {
@Override
public Boolean call() {
return proxyService.removeProxyListener(registrationId);
}
});
return registrationId;
}
use of com.hazelcast.spi.ProxyService in project hazelcast by hazelcast.
the class DestroyProxyMessageTask method call.
@Override
protected Object call() throws Exception {
ProxyService proxyService = nodeEngine.getProxyService();
proxyService.destroyDistributedObject(parameters.serviceName, parameters.name);
return null;
}
Aggregations