void applyState() { MapService mapService = mapReplicationOperation.getService(); MetaDataGenerator metaDataGenerator = getPartitionMetaDataGenerator(mapService); int partitionId = mapReplicationOperation.getPartitionId(); if (partitionUuid != null) { metaDataGenerator.setUuid(partitionId, partitionUuid); } for (int i = 0; i < mapNameSequencePairs.size(); ) { String mapName = (String) mapNameSequencePairs.get(i++); long sequence = (Long) mapNameSequencePairs.get(i++); metaDataGenerator.setCurrentSequence(mapName, partitionId, sequence); } }
void applyState() { MapService mapService = mapReplicationOperation.getService(); MetaDataGenerator metaDataGenerator = getPartitionMetaDataGenerator(mapService); int partitionId = mapReplicationOperation.getPartitionId(); if (partitionUuid != null) { metaDataGenerator.setUuid(partitionId, partitionUuid); } for (int i = 0; i < mapNameSequencePairs.size(); ) { String mapName = (String) mapNameSequencePairs.get(i++); long sequence = (Long) mapNameSequencePairs.get(i++); metaDataGenerator.setCurrentSequence(mapName, partitionId, sequence); } }
RecordStore getRecordStore(String mapName) { final boolean skipLoadingOnRecordStoreCreate = true; MapService mapService = getService(); MapServiceContext mapServiceContext = mapService.getMapServiceContext(); return mapServiceContext.getRecordStore(getPartitionId(), mapName, skipLoadingOnRecordStoreCreate); }
RecordStore getRecordStore(String mapName) { final boolean skipLoadingOnRecordStoreCreate = true; MapService mapService = getService(); MapServiceContext mapServiceContext = mapService.getMapServiceContext(); return mapServiceContext.getRecordStore(getPartitionId(), mapName, skipLoadingOnRecordStoreCreate); }
.getPartitionContainer(operation.getPartitionId()); for (Map.Entry<String, Boolean> indexDefinition : mapContainer.getIndexDefinitions().entrySet()) { Indexes indexes = mapContainer.getIndexes(partitionContainer.getPartitionId());
.getPartitionContainer(operation.getPartitionId()); for (Map.Entry<String, Boolean> indexDefinition : mapContainer.getIndexDefinitions().entrySet()) { Indexes indexes = mapContainer.getIndexes(partitionContainer.getPartitionId());
private void addIndexes(String mapName, Collection<IndexInfo> indexInfos) { if (indexInfos == null) { return; } RecordStore recordStore = operation.getRecordStore(mapName); MapContainer mapContainer = recordStore.getMapContainer(); if (mapContainer.isGlobalIndexEnabled()) { // creating global indexes on partition thread in case they do not exist for (IndexInfo indexInfo : indexInfos) { Indexes indexes = mapContainer.getIndexes(); // optimisation not to synchronize each partition thread on the addOrGetIndex method if (indexes.getIndex(indexInfo.getAttributeName()) == null) { indexes.addOrGetIndex(indexInfo.getAttributeName(), indexInfo.isOrdered()); } } } else { Indexes indexes = mapContainer.getIndexes(operation.getPartitionId()); for (IndexInfo indexInfo : indexInfos) { indexes.addOrGetIndex(indexInfo.getAttributeName(), indexInfo.isOrdered()); } } }
private void addIndexes(String mapName, Collection<IndexInfo> indexInfos) { if (indexInfos == null) { return; } RecordStore recordStore = operation.getRecordStore(mapName); MapContainer mapContainer = recordStore.getMapContainer(); if (mapContainer.isGlobalIndexEnabled()) { // creating global indexes on partition thread in case they do not exist for (IndexInfo indexInfo : indexInfos) { Indexes indexes = mapContainer.getIndexes(); // optimisation not to synchronize each partition thread on the addOrGetIndex method if (indexes.getIndex(indexInfo.getName()) == null) { indexes.addOrGetIndex(indexInfo.getName(), indexInfo.isOrdered()); } } } else { Indexes indexes = mapContainer.getIndexes(operation.getPartitionId()); for (IndexInfo indexInfo : indexInfos) { indexes.addOrGetIndex(indexInfo.getName(), indexInfo.isOrdered()); } } }