private static SerializationService getSerializationService(RecordStore recordStore) { return recordStore.getMapContainer().getMapServiceContext().getNodeEngine().getSerializationService(); }
private static SerializationService getSerializationService(RecordStore recordStore) { return recordStore.getMapContainer().getMapServiceContext().getNodeEngine().getSerializationService(); }
BasicRecordStoreLoader(RecordStore recordStore) { final MapContainer mapContainer = recordStore.getMapContainer(); this.name = mapContainer.getName(); this.mapServiceContext = mapContainer.getMapServiceContext(); this.partitionId = recordStore.getPartitionId(); this.mapDataStore = recordStore.getMapDataStore(); this.logger = mapServiceContext.getNodeEngine().getLogger(getClass()); }
BasicRecordStoreLoader(RecordStore recordStore) { final MapContainer mapContainer = recordStore.getMapContainer(); this.name = mapContainer.getName(); this.mapServiceContext = mapContainer.getMapServiceContext(); this.partitionId = recordStore.getPartitionId(); this.mapDataStore = recordStore.getMapDataStore(); this.logger = mapServiceContext.getNodeEngine().getLogger(getClass()); }
PartitionContainer partitionContainer = recordStore.getMapContainer().getMapServiceContext() .getPartitionContainer(operation.getPartitionId()); for (Map.Entry<String, Boolean> indexDefinition : mapContainer.getIndexDefinitions().entrySet()) { final SerializationService serializationService = mapContainer.getMapServiceContext().getNodeEngine() .getSerializationService(); final boolean indexesMustBePopulated = indexesMustBePopulated(indexes, operation);
PartitionContainer partitionContainer = recordStore.getMapContainer().getMapServiceContext() .getPartitionContainer(operation.getPartitionId()); for (Map.Entry<String, Boolean> indexDefinition : mapContainer.getIndexDefinitions().entrySet()) { final SerializationService serializationService = mapContainer.getMapServiceContext().getNodeEngine() .getSerializationService(); final boolean indexesMustBePopulated = indexesMustBePopulated(indexes, operation);
protected AbstractRecordStore(MapContainer mapContainer, int partitionId) { this.name = mapContainer.getName(); this.mapContainer = mapContainer; this.partitionId = partitionId; this.mapServiceContext = mapContainer.getMapServiceContext(); NodeEngine nodeEngine = mapServiceContext.getNodeEngine(); this.serializationService = nodeEngine.getSerializationService(); this.inMemoryFormat = mapContainer.getMapConfig().getInMemoryFormat(); this.recordFactory = mapContainer.getRecordFactoryConstructor().createNew(null); this.valueComparator = mapServiceContext.getValueComparatorOf(inMemoryFormat); this.mapStoreContext = mapContainer.getMapStoreContext(); this.mapDataStore = mapStoreContext.getMapStoreManager().getMapDataStore(name, partitionId); this.lockStore = createLockStore(); Collection<RecordStoreMutationObserver<Record>> mutationObservers = mapServiceContext .createRecordStoreMutationObservers(getName(), partitionId); this.mutationObserver = new CompositeRecordStoreMutationObserver<Record>(mutationObservers); }
protected AbstractRecordStore(MapContainer mapContainer, int partitionId) { this.name = mapContainer.getName(); this.mapContainer = mapContainer; this.partitionId = partitionId; this.mapServiceContext = mapContainer.getMapServiceContext(); NodeEngine nodeEngine = mapServiceContext.getNodeEngine(); this.serializationService = nodeEngine.getSerializationService(); this.inMemoryFormat = mapContainer.getMapConfig().getInMemoryFormat(); this.recordFactory = mapContainer.getRecordFactoryConstructor().createNew(null); this.valueComparator = mapServiceContext.getValueComparatorOf(inMemoryFormat); this.mapStoreContext = mapContainer.getMapStoreContext(); this.mapDataStore = mapStoreContext.getMapStoreManager().getMapDataStore(name, partitionId); this.lockStore = createLockStore(); Collection<RecordStoreMutationObserver<Record>> mutationObservers = mapServiceContext .createRecordStoreMutationObservers(getName(), partitionId); this.mutationObserver = new CompositeRecordStoreMutationObserver<Record>(mutationObservers); }
@SuppressWarnings("checkstyle:executablestatementcount") private EntryOperator(MapOperation mapOperation, Object processor, Predicate predicate, boolean collectWanEvents) { this.backup = mapOperation instanceof BackupOperation; setProcessor(processor); this.mapOperation = mapOperation; this.predicate = predicate; this.recordStore = mapOperation.recordStore; this.readOnly = entryProcessor instanceof ReadOnly; this.mapContainer = recordStore.getMapContainer(); this.inMemoryFormat = mapContainer.getMapConfig().getInMemoryFormat(); this.mapName = mapContainer.getName(); this.wanReplicationEnabled = mapContainer.isWanReplicationEnabled(); this.shouldClone = mapContainer.shouldCloneOnEntryProcessing(mapOperation.getPartitionId()); this.mapServiceContext = mapContainer.getMapServiceContext(); LocalMapStatsProvider localMapStatsProvider = mapServiceContext.getLocalMapStatsProvider(); this.stats = localMapStatsProvider.getLocalMapStatsImpl(mapName); NodeEngine nodeEngine = mapServiceContext.getNodeEngine(); this.ss = ((InternalSerializationService) nodeEngine.getSerializationService()); this.partitionService = nodeEngine.getPartitionService(); EventService eventService = nodeEngine.getEventService(); this.hasEventRegistration = eventService.hasEventRegistration(SERVICE_NAME, mapName); this.mapEventPublisher = mapServiceContext.getMapEventPublisher(); this.partitionId = recordStore.getPartitionId(); this.callerAddress = mapOperation.getCallerAddress(); }
@SuppressWarnings("checkstyle:executablestatementcount") private EntryOperator(MapOperation mapOperation, Object processor, Predicate predicate, boolean collectWanEvents) { this.backup = mapOperation instanceof BackupOperation; setProcessor(processor); this.mapOperation = mapOperation; this.predicate = predicate; this.recordStore = mapOperation.recordStore; this.readOnly = entryProcessor instanceof ReadOnly; this.mapContainer = recordStore.getMapContainer(); this.inMemoryFormat = mapContainer.getMapConfig().getInMemoryFormat(); this.mapName = mapContainer.getName(); this.wanReplicationEnabled = mapContainer.isWanReplicationEnabled(); this.shouldClone = mapContainer.shouldCloneOnEntryProcessing(mapOperation.getPartitionId()); this.mapServiceContext = mapContainer.getMapServiceContext(); LocalMapStatsProvider localMapStatsProvider = mapServiceContext.getLocalMapStatsProvider(); this.stats = localMapStatsProvider.getLocalMapStatsImpl(mapName); NodeEngine nodeEngine = mapServiceContext.getNodeEngine(); this.ss = ((InternalSerializationService) nodeEngine.getSerializationService()); this.partitionService = nodeEngine.getPartitionService(); EventService eventService = nodeEngine.getEventService(); this.hasEventRegistration = eventService.hasEventRegistration(SERVICE_NAME, mapName); this.mapEventPublisher = mapServiceContext.getMapEventPublisher(); this.partitionId = recordStore.getPartitionId(); this.callerAddress = mapOperation.getCallerAddress(); }
static MapStoreContext create(MapContainer mapContainer) { final BasicMapStoreContext context = new BasicMapStoreContext(); final String mapName = mapContainer.getName(); final MapServiceContext mapServiceContext = mapContainer.getMapServiceContext(); final NodeEngine nodeEngine = mapServiceContext.getNodeEngine(); final PartitioningStrategy partitioningStrategy = mapContainer.getPartitioningStrategy(); final MapConfig mapConfig = mapContainer.getMapConfig(); final MapStoreConfig mapStoreConfig = mapConfig.getMapStoreConfig(); final ClassLoader configClassLoader = nodeEngine.getConfigClassLoader(); // create store. final Object store = createStore(mapName, mapStoreConfig, configClassLoader); final MapStoreWrapper storeWrapper = new MapStoreWrapper(mapName, store); storeWrapper.instrument(nodeEngine); setStoreImplToWritableMapStoreConfig(nodeEngine, mapName, store); context.setMapName(mapName); context.setMapStoreConfig(mapStoreConfig); context.setPartitioningStrategy(partitioningStrategy); context.setMapServiceContext(mapServiceContext); context.setStoreWrapper(storeWrapper); final MapStoreManager mapStoreManager = createMapStoreManager(context); context.setMapStoreManager(mapStoreManager); // todo this is user code. it may also block map store creation. callLifecycleSupportInit(context); return context; }
static MapStoreContext create(MapContainer mapContainer) { final BasicMapStoreContext context = new BasicMapStoreContext(); final String mapName = mapContainer.getName(); final MapServiceContext mapServiceContext = mapContainer.getMapServiceContext(); final NodeEngine nodeEngine = mapServiceContext.getNodeEngine(); final PartitioningStrategy partitioningStrategy = mapContainer.getPartitioningStrategy(); final MapConfig mapConfig = mapContainer.getMapConfig(); final MapStoreConfig mapStoreConfig = mapConfig.getMapStoreConfig(); final ClassLoader configClassLoader = nodeEngine.getConfigClassLoader(); // create store. final Object store = createStore(mapName, mapStoreConfig, configClassLoader); final MapStoreWrapper storeWrapper = new MapStoreWrapper(mapName, store); storeWrapper.instrument(nodeEngine); setStoreImplToWritableMapStoreConfig(nodeEngine, mapName, store); context.setMapName(mapName); context.setMapStoreConfig(mapStoreConfig); context.setPartitioningStrategy(partitioningStrategy); context.setMapServiceContext(mapServiceContext); context.setStoreWrapper(storeWrapper); final MapStoreManager mapStoreManager = createMapStoreManager(context); context.setMapStoreManager(mapStoreManager); // todo this is user code. it may also block map store creation. callLifecycleSupportInit(context); return context; }