コード例 #1
0
ファイル: FusionIndexReader.cs プロジェクト: Neo4Net/Neo4Net
        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));
        }
コード例 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public String getPopulationFailure(org.neo4j.storageengine.api.schema.StoreIndexDescriptor descriptor) throws IllegalStateException
        public override string GetPopulationFailure(StoreIndexDescriptor descriptor)
        {
            StringBuilder builder = new StringBuilder();

            _providers.forAll(p => writeFailure(p.GetType().Name, builder, p, descriptor));
            string failure = builder.ToString();

            if (failure.Length > 0)
            {
                return(failure);
            }
            throw new System.InvalidOperationException("None of the indexes were in a failed state");
        }
コード例 #3
0
ファイル: FusionIndexReader.cs プロジェクト: Neo4Net/Neo4Net
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void query(org.neo4j.storageengine.api.schema.IndexProgressor_NodeValueClient cursor, org.neo4j.internal.kernel.api.IndexOrder indexOrder, boolean needsValues, org.neo4j.internal.kernel.api.IndexQuery... predicates) throws org.neo4j.internal.kernel.api.exceptions.schema.IndexNotApplicableKernelException
        public override void Query(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient cursor, IndexOrder indexOrder, bool needsValues, params IndexQuery[] predicates)
        {
//JAVA TO C# CONVERTER TODO TASK: Method reference arbitrary object instance method syntax is not converted by Java to C# Converter:
            IndexSlot slot = SlotSelector.selectSlot(predicates, IndexQuery::valueGroup);

            if (slot != null)
            {
                InstanceSelector.select(slot).query(cursor, indexOrder, needsValues, predicates);
            }
            else
            {
                if (indexOrder != IndexOrder.NONE)
                {
                    throw new System.NotSupportedException(format("Tried to query index with unsupported order %s. Supported orders for query %s are %s.", indexOrder, Arrays.ToString(predicates), IndexOrder.NONE));
                }
                BridgingIndexProgressor multiProgressor = new BridgingIndexProgressor(cursor, _descriptor.schema().PropertyIds);
                cursor.Initialize(_descriptor, multiProgressor, predicates, indexOrder, needsValues);
                try
                {
                    InstanceSelector.forAll(reader =>
                    {
                        try
                        {
                            reader.query(multiProgressor, indexOrder, needsValues, predicates);
                        }
                        catch (IndexNotApplicableKernelException e)
                        {
                            throw new InnerException(e);
                        }
                    });
                }
                catch (InnerException e)
                {
                    throw e.InnerException;
                }
            }
        }
コード例 #4
0
 public override void Refresh()
 {
     InstanceSelector.forAll(IndexAccessor.refresh);
 }
コード例 #5
0
 public override void Force(IOLimiter ioLimiter)
 {
     InstanceSelector.forAll(accessor => accessor.force(ioLimiter));
 }
コード例 #6
0
 public override void Drop()
 {
     InstanceSelector.forAll(IndexAccessor.drop);
     _dropAction.drop(_descriptor.Id);
 }
コード例 #7
0
 public override void Drop()
 {
     InstanceSelector.forAll(IndexPopulator.drop);
     _dropAction.drop(_indexId);
 }
コード例 #8
0
 public override void Create()
 {
     _dropAction.drop(_indexId, _archiveFailedIndex);
     InstanceSelector.forAll(IndexPopulator.create);
 }
コード例 #9
0
 public override void MarkAsFailed(string failure)
 {
     InstanceSelector.forAll(populator => populator.markAsFailed(failure));
 }