use of com.hazelcast.map.impl.MapServiceContext in project hazelcast by hazelcast.
the class ClearExpiredOperation method afterRun.
@Override
public void afterRun() throws Exception {
final MapService mapService = getService();
MapServiceContext mapServiceContext = mapService.getMapServiceContext();
final PartitionContainer partitionContainer = mapServiceContext.getPartitionContainer(getPartitionId());
partitionContainer.setHasRunningCleanup(false);
partitionContainer.setLastCleanupTime(Clock.currentTimeMillis());
}
use of com.hazelcast.map.impl.MapServiceContext in project hazelcast by hazelcast.
the class RemoveInterceptorOperation method run.
@Override
public void run() {
mapService = getService();
MapServiceContext mapServiceContext = mapService.getMapServiceContext();
MapContainer mapContainer = mapServiceContext.getMapContainer(mapName);
mapContainer.getInterceptorRegistry().deregister(id);
}
use of com.hazelcast.map.impl.MapServiceContext in project hazelcast by hazelcast.
the class PostJoinMapOperation method run.
@Override
public void run() throws Exception {
MapService mapService = getService();
MapServiceContext mapServiceContext = mapService.getMapServiceContext();
for (MapIndexInfo mapIndex : indexInfoList) {
final MapContainer mapContainer = mapServiceContext.getMapContainer(mapIndex.mapName);
final Indexes indexes = mapContainer.getIndexes();
for (MapIndexInfo.IndexInfo indexInfo : mapIndex.lsIndexes) {
indexes.addOrGetIndex(indexInfo.attributeName, indexInfo.ordered);
}
}
for (InterceptorInfo interceptorInfo : interceptorInfoList) {
final MapContainer mapContainer = mapServiceContext.getMapContainer(interceptorInfo.mapName);
InterceptorRegistry interceptorRegistry = mapContainer.getInterceptorRegistry();
Map<String, MapInterceptor> interceptorMap = interceptorRegistry.getId2InterceptorMap();
List<Map.Entry<String, MapInterceptor>> entryList = interceptorInfo.interceptors;
for (Map.Entry<String, MapInterceptor> entry : entryList) {
if (!interceptorMap.containsKey(entry.getKey())) {
interceptorRegistry.register(entry.getKey(), entry.getValue());
}
}
}
createQueryCaches();
}
use of com.hazelcast.map.impl.MapServiceContext in project hazelcast by hazelcast.
the class NodeQueryCacheEventService method publishEventInternal.
private void publishEventInternal(EventRegistration registration, Object eventData, int orderKey) {
MapServiceContext mapServiceContext = this.mapServiceContext;
NodeEngine nodeEngine = mapServiceContext.getNodeEngine();
EventService eventService = nodeEngine.getEventService();
eventService.publishEvent(MapService.SERVICE_NAME, registration, eventData, orderKey);
}
use of com.hazelcast.map.impl.MapServiceContext in project hazelcast by hazelcast.
the class AbstractMapPartitionMessageTask method getMapOperationProvider.
protected final MapOperationProvider getMapOperationProvider(String mapName) {
MapService mapService = getService(MapService.SERVICE_NAME);
MapServiceContext mapServiceContext = mapService.getMapServiceContext();
return mapServiceContext.getMapOperationProvider(mapName);
}
Aggregations