use of com.hazelcast.map.impl.MapServiceContext in project hazelcast by hazelcast.
the class AbstractMapAllPartitionsMessageTask method getOperationProvider.
protected final MapOperationProvider getOperationProvider(String mapName) {
MapService mapService = getService(SERVICE_NAME);
MapServiceContext mapServiceContext = mapService.getMapServiceContext();
return mapServiceContext.getMapOperationProvider(mapName);
}
use of com.hazelcast.map.impl.MapServiceContext in project hazelcast by hazelcast.
the class MapAddInterceptorMessageTask method createOperationSupplier.
@Override
protected Supplier<Operation> createOperationSupplier() {
final MapService mapService = getService(MapService.SERVICE_NAME);
final MapServiceContext mapServiceContext = mapService.getMapServiceContext();
final MapInterceptor mapInterceptor = serializationService.toObject(parameters.interceptor);
id = mapServiceContext.generateInterceptorId(parameters.name, mapInterceptor);
return new AddInterceptorOperationSupplier(id, parameters.name, mapInterceptor);
}
use of com.hazelcast.map.impl.MapServiceContext in project hazelcast by hazelcast.
the class MapAddListenerMessageTask method registerListener.
private String registerListener(ClientEndpoint endpoint, ListenerAdapter adapter) {
MapService mapService = getService(MapService.SERVICE_NAME);
MapServiceContext mapServiceContext = mapService.getMapServiceContext();
String registrationId;
if (parameters.localOnly) {
registrationId = mapServiceContext.addLocalListenerAdapter(adapter, parameters.listenerName);
} else {
registrationId = mapServiceContext.addListenerAdapter(adapter, TrueEventFilter.INSTANCE, parameters.listenerName);
}
endpoint.addListenerDestroyAction(MapService.SERVICE_NAME, parameters.listenerName, registrationId);
return registrationId;
}
use of com.hazelcast.map.impl.MapServiceContext in project hazelcast by hazelcast.
the class NodeQueryCacheEventService method getRegistrations.
private Collection<EventRegistration> getRegistrations(String mapName) {
MapServiceContext mapServiceContext = this.mapServiceContext;
NodeEngine nodeEngine = mapServiceContext.getNodeEngine();
EventService eventService = nodeEngine.getEventService();
return eventService.getRegistrations(MapService.SERVICE_NAME, mapName);
}
use of com.hazelcast.map.impl.MapServiceContext 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.name, CLEAR_ALL, clearedTotal);
}
return null;
}
Aggregations