Search in sources :

Example 16 with MapServiceContext

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());
}
Also used : PartitionContainer(com.hazelcast.map.impl.PartitionContainer) MapService(com.hazelcast.map.impl.MapService) MapServiceContext(com.hazelcast.map.impl.MapServiceContext)

Example 17 with MapServiceContext

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);
}
Also used : MapServiceContext(com.hazelcast.map.impl.MapServiceContext) MapContainer(com.hazelcast.map.impl.MapContainer)

Example 18 with MapServiceContext

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();
}
Also used : MapInterceptor(com.hazelcast.map.MapInterceptor) Indexes(com.hazelcast.query.impl.Indexes) MapServiceContext(com.hazelcast.map.impl.MapServiceContext) MapContainer(com.hazelcast.map.impl.MapContainer) InterceptorRegistry(com.hazelcast.map.impl.InterceptorRegistry) MapService(com.hazelcast.map.impl.MapService) HashMap(java.util.HashMap) Map(java.util.Map) AbstractMap(java.util.AbstractMap)

Example 19 with MapServiceContext

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);
}
Also used : NodeEngine(com.hazelcast.spi.NodeEngine) QueryCacheEventService(com.hazelcast.map.impl.querycache.QueryCacheEventService) EventService(com.hazelcast.spi.EventService) MapServiceContext(com.hazelcast.map.impl.MapServiceContext)

Example 20 with MapServiceContext

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);
}
Also used : MapService(com.hazelcast.map.impl.MapService) MapServiceContext(com.hazelcast.map.impl.MapServiceContext)

Aggregations

MapServiceContext (com.hazelcast.map.impl.MapServiceContext)63 MapService (com.hazelcast.map.impl.MapService)44 MapNearCacheManager (com.hazelcast.map.impl.nearcache.MapNearCacheManager)15 NodeEngineImpl (com.hazelcast.spi.impl.NodeEngineImpl)14 Invalidator (com.hazelcast.internal.nearcache.impl.invalidation.Invalidator)12 RecordStore (com.hazelcast.map.impl.recordstore.RecordStore)12 MetaDataGenerator (com.hazelcast.internal.nearcache.impl.invalidation.MetaDataGenerator)10 NodeEngine (com.hazelcast.spi.NodeEngine)10 MapProxyImpl (com.hazelcast.map.impl.proxy.MapProxyImpl)7 HazelcastInstance (com.hazelcast.core.HazelcastInstance)6 MapContainer (com.hazelcast.map.impl.MapContainer)6 Data (com.hazelcast.nio.serialization.Data)6 PartitionContainer (com.hazelcast.map.impl.PartitionContainer)5 MapStoreConfig (com.hazelcast.config.MapStoreConfig)4 SimpleEntryView (com.hazelcast.map.impl.SimpleEntryView)4 HashMap (java.util.HashMap)4 Config (com.hazelcast.config.Config)3 MapConfig (com.hazelcast.config.MapConfig)3 NearCacheConfig (com.hazelcast.config.NearCacheConfig)3 Node (com.hazelcast.instance.Node)3