public override IndexUpdater NewPopulatingUpdater(NodePropertyAccessor accessor) { LazyInstanceSelector <IndexUpdater> updaterSelector = new LazyInstanceSelector <IndexUpdater>(slot => InstanceSelector.select(slot).newPopulatingUpdater(accessor)); return(new FusionIndexUpdater(SlotSelector, updaterSelector)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void verifyDeferredConstraints(org.neo4j.storageengine.api.NodePropertyAccessor accessor) throws org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException, java.io.IOException public override void VerifyDeferredConstraints(NodePropertyAccessor accessor) { Delegate.verifyDeferredConstraints(accessor); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void verifyDeferredConstraints(org.neo4j.storageengine.api.NodePropertyAccessor nodePropertyAccessor) throws org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException public override void VerifyDeferredConstraints(NodePropertyAccessor nodePropertyAccessor) { SpatialVerifyDeferredConstraint.Verify(nodePropertyAccessor, Layout, tree, Descriptor); base.VerifyDeferredConstraints(nodePropertyAccessor); }
/// <summary> /// OBS this implementation can only provide values for properties of type <seealso cref="string"/>. /// Other property types will still be counted as distinct, but {@code client} won't receive <seealso cref="Value"/> /// instances for those. </summary> /// <param name="client"> <seealso cref="IndexProgressor.NodeValueClient"/> to get initialized with this progression. </param> /// <param name="propertyAccessor"> <seealso cref="NodePropertyAccessor"/> for reading property values. </param> /// <param name="needsValues"> whether or not to load string values. </param> public override void DistinctValues(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, NodePropertyAccessor propertyAccessor, bool needsValues) { try { IndexQuery[] noQueries = new IndexQuery[0]; BridgingIndexProgressor multiProgressor = new BridgingIndexProgressor(client, _descriptor.schema().PropertyIds); Fields fields = MultiFields.getFields(IndexSearcher.IndexReader); foreach (ValueEncoding valueEncoding in ValueEncoding.values()) { Terms terms = fields.terms(valueEncoding.key()); if (terms != null) { System.Func <BytesRef, Value> valueMaterializer = valueEncoding == ValueEncoding.String && needsValues ? term => Values.stringValue(term.utf8ToString()) : term => null; TermsEnum termsIterator = terms.GetEnumerator(); if (valueEncoding == ValueEncoding.Number) { termsIterator = NumericUtils.filterPrefixCodedLongs(termsIterator); } multiProgressor.Initialize(_descriptor, new LuceneDistinctValuesProgressor(termsIterator, client, valueMaterializer), noQueries, IndexOrder.NONE, needsValues); } } client.Initialize(_descriptor, multiProgressor, noQueries, IndexOrder.NONE, needsValues); } catch (IOException e) { throw new UncheckedIOException(e); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void verifyDeferredConstraints(org.neo4j.storageengine.api.NodePropertyAccessor nodePropertyAccessor) throws org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException public override void VerifyDeferredConstraints(NodePropertyAccessor nodePropertyAccessor) { }
public override void distinctValues(IndexProgressor_NodeValueClient client, NodePropertyAccessor propertyAccessor, bool needsValues) { }
public override void DistinctValues(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, NodePropertyAccessor propertyAccessor, bool needsValues) { KEY lowest = Layout.newKey(); lowest.initialize(long.MinValue); lowest.initValuesAsLowest(); KEY highest = Layout.newKey(); highest.initialize(long.MaxValue); highest.initValuesAsHighest(); try { RawCursor <Hit <KEY, VALUE>, IOException> seeker = Tree.seek(lowest, highest); client.Initialize(Descriptor, new NativeDistinctValuesProgressor <>(seeker, client, OpenSeekers, Layout, Layout.compareValue), new IndexQuery[0], IndexOrder.NONE, needsValues); } catch (IOException e) { throw new UncheckedIOException(e); } }
public NativeDistinctValuesProgressorAnonymousInnerClass(SpatialIndexPartReader <VALUE> outerInstance, RawCursor <Hit <SpatialIndexKey, VALUE>, IOException> seeker, Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, UnknownType openSeekers, UnknownType layout, IComparer <SpatialIndexKey> comparator, NodePropertyAccessor propertyAccessor) : base(seeker, client, openSeekers, layout, comparator) { this.outerInstance = outerInstance; this._propertyAccessor = propertyAccessor; }
public override void VerifyDeferredConstraints(NodePropertyAccessor accessor) { throw new System.NotSupportedException("Should not be called directly"); }
public override void DistinctValues(IndexProgressor_NodeValueClient client, NodePropertyAccessor propertyAccessor, bool needsValues) { _actual.distinctValues(client, propertyAccessor, needsValues); }
public override void DistinctValues(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, NodePropertyAccessor propertyAccessor, bool needsValues) { // This is basically a version of the basic implementation, but with added consulting of the PropertyAccessor // since these are lossy spatial values. SpatialIndexKey lowest = layout.newKey(); lowest.initialize(long.MinValue); lowest.initValuesAsLowest(); SpatialIndexKey highest = layout.newKey(); highest.initialize(long.MaxValue); highest.initValuesAsHighest(); try { RawCursor <Hit <SpatialIndexKey, VALUE>, IOException> seeker = tree.seek(lowest, highest); IComparer <SpatialIndexKey> comparator = new PropertyLookupFallbackComparator <SpatialIndexKey>(layout, propertyAccessor, descriptor.schema().PropertyId); NativeDistinctValuesProgressor <SpatialIndexKey, VALUE> progressor = new NativeDistinctValuesProgressorAnonymousInnerClass(this, seeker, client, openSeekers, layout, comparator, propertyAccessor); client.Initialize(descriptor, progressor, new IndexQuery[0], IndexOrder.NONE, false); } catch (IOException e) { throw new UncheckedIOException(e); } }
public override void VerifyDeferredConstraints(NodePropertyAccessor propertyAccessor) { //The fulltext index does not care about constraints. }
public override IndexUpdater NewPopulatingUpdater(NodePropertyAccessor accessor) { return(new PopulatingFulltextIndexUpdater(this)); }
public ConstraintIndexCreator(System.Func <Kernel> kernelSupplier, IndexingService indexingService, NodePropertyAccessor nodePropertyAccessor, LogProvider logProvider) { this._kernelSupplier = kernelSupplier; this._indexingService = indexingService; this._nodePropertyAccessor = nodePropertyAccessor; this._log = logProvider.GetLog(typeof(ConstraintIndexCreator)); }
/// <summary> /// {@inheritDoc} /// </summary> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void verifyUniqueness(org.neo4j.storageengine.api.NodePropertyAccessor accessor, int[] propertyKeyIds) throws java.io.IOException, org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException public override void VerifyUniqueness(NodePropertyAccessor accessor, int[] propertyKeyIds) { luceneIndex.verifyUniqueness(accessor, propertyKeyIds); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public abstract void verifyDeferredConstraints(org.neo4j.storageengine.api.NodePropertyAccessor propertyAccessor) throws org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException; public override abstract void VerifyDeferredConstraints(NodePropertyAccessor propertyAccessor);
/// <summary> /// {@inheritDoc} /// </summary> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void verifyUniqueness(org.neo4j.storageengine.api.NodePropertyAccessor accessor, int[] propertyKeyIds, java.util.List<org.neo4j.values.storable.Value[]> updatedValueTuples) throws java.io.IOException, org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException public override void VerifyUniqueness(NodePropertyAccessor accessor, int[] propertyKeyIds, IList <Value[]> updatedValueTuples) { luceneIndex.verifyUniqueness(accessor, propertyKeyIds, updatedValueTuples); }
public override void VerifyDeferredConstraints(NodePropertyAccessor nodePropertyAccessor) { // No-op, uniqueness is checked for each update in add(IndexEntryUpdate) }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void verifyDeferredConstraints(org.neo4j.storageengine.api.NodePropertyAccessor nodePropertyAccessor) throws org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException public override void VerifyDeferredConstraints(NodePropertyAccessor nodePropertyAccessor) { // Not needed since uniqueness is verified automatically w/o cost for every update. }
public override IndexUpdater NewPopulatingUpdater(NodePropertyAccessor accessor) { return(new TemporalIndexPopulatingUpdater(this, accessor)); }
public override IndexUpdater NewPopulatingUpdater(NodePropertyAccessor nodePropertyAccessor) { return(NewUpdater(IndexUpdateMode.Online)); }
public void verifyDeferredConstraints(NodePropertyAccessor nodePropertyAccessor) { }
public override IndexUpdater NewPopulatingUpdater(NodePropertyAccessor accessor) { return(SwallowingIndexUpdater.INSTANCE); }
public override IndexUpdater NewPopulatingUpdater(NodePropertyAccessor accessor) { return(_actual.newPopulatingUpdater(accessor)); }
internal PropertyLookupFallbackComparator(IndexLayout <KEY, VALUE> schemaLayout, NodePropertyAccessor propertyAccessor, int propertyKeyId) { this._schemaLayout = schemaLayout; this._propertyAccessor = propertyAccessor; this._propertyKeyId = propertyKeyId; }
private DuplicateCheckingCollector GetDuplicateCollector(NodePropertyAccessor accessor, int[] propertyKeyIds) { return(DuplicateCheckingCollector.ForProperties(accessor, propertyKeyIds)); }
public override IndexUpdater newPopulatingUpdater(NodePropertyAccessor accessor) { return(new IndexUpdaterAnonymousInnerClass(this)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private static void updatePopulator(org.neo4j.kernel.api.index.IndexPopulator populator, Iterable<org.neo4j.kernel.api.index.IndexEntryUpdate<?>> updates, org.neo4j.storageengine.api.NodePropertyAccessor accessor) throws java.io.IOException, org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException private static void UpdatePopulator <T1>(IndexPopulator populator, IEnumerable <T1> updates, NodePropertyAccessor accessor) { using (IndexUpdater updater = populator.NewPopulatingUpdater(accessor)) { //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: for (org.neo4j.kernel.api.index.IndexEntryUpdate<?> update : updates) foreach (IndexEntryUpdate <object> update in updates) { updater.Process(update); } } }
public override void DistinctValues(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient cursor, NodePropertyAccessor propertyAccessor, bool needsValues) { BridgingIndexProgressor multiProgressor = new BridgingIndexProgressor(cursor, _descriptor.schema().PropertyIds); cursor.Initialize(_descriptor, multiProgressor, new IndexQuery[0], IndexOrder.NONE, needsValues); InstanceSelector.forAll(reader => reader.distinctValues(multiProgressor, propertyAccessor, needsValues)); }
public override void DistinctValues(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient cursor, NodePropertyAccessor propertyAccessor, bool needsValues) { LoadAll(); BridgingIndexProgressor multiProgressor = new BridgingIndexProgressor(cursor, _descriptor.schema().PropertyIds); cursor.Initialize(_descriptor, multiProgressor, new IndexQuery[0], IndexOrder.NONE, false); //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: for (NativeIndexReader<?,NativeIndexValue> reader : this) foreach (NativeIndexReader <object, NativeIndexValue> reader in this) { reader.DistinctValues(multiProgressor, propertyAccessor, needsValues); } }