internal SchemaCacheState(SchemaCacheState schemaCacheState) { this.ConstraintSemantics = schemaCacheState.ConstraintSemantics; this.IndexDescriptorById = LongObjectHashMap.newMap(schemaCacheState.IndexDescriptorById); this.ConstraintRuleById = LongObjectHashMap.newMap(schemaCacheState.ConstraintRuleById); this.ConstraintsConflict = new HashSet <ConstraintDescriptor>(schemaCacheState.ConstraintsConflict); this.IndexDescriptorsConflict = new Dictionary <SchemaDescriptor, CapableIndexDescriptor>(schemaCacheState.IndexDescriptorsConflict); this.IndexDescriptorsByLabel = new IntObjectHashMap <ISet <CapableIndexDescriptor> >(schemaCacheState.IndexDescriptorsByLabel.size()); schemaCacheState.IndexDescriptorsByLabel.forEachKeyValue((k, v) => IndexDescriptorsByLabel.put(k, new HashSet <>(v))); this.IndexDescriptorsByRelationshipType = new IntObjectHashMap <ISet <CapableIndexDescriptor> >(schemaCacheState.IndexDescriptorsByRelationshipType.size()); schemaCacheState.IndexDescriptorsByRelationshipType.forEachKeyValue((k, v) => IndexDescriptorsByRelationshipType.put(k, new HashSet <>(v))); this.IndexDescriptorsByName = new Dictionary <string, CapableIndexDescriptor>(schemaCacheState.IndexDescriptorsByName); this.DependantState = new ConcurrentDictionary <Type, object>(); this.IndexByProperty = new IntObjectHashMap <IList <CapableIndexDescriptor> >(schemaCacheState.IndexByProperty.size()); schemaCacheState.IndexByProperty.forEachKeyValue((k, v) => IndexByProperty.put(k, new List <>(v))); this.IndexProviderMap = schemaCacheState.IndexProviderMap; }
public override IndexMap Clone() { return(new IndexMap(LongObjectHashMap.newMap(_indexesById), CloneMap(_indexesByDescriptor), new ObjectLongHashMap <>(_indexIdsByDescriptor), LongObjectHashMap.newMap(_uniquenessConstraintsById))); }