Esempio n. 1
0
        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));
        }
Esempio n. 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");
        }
Esempio n. 3
0
//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;
                }
            }
        }
Esempio n. 4
0
 public override void Refresh()
 {
     InstanceSelector.forAll(IndexAccessor.refresh);
 }
Esempio n. 5
0
 public override void Force(IOLimiter ioLimiter)
 {
     InstanceSelector.forAll(accessor => accessor.force(ioLimiter));
 }
Esempio n. 6
0
 public override void Drop()
 {
     InstanceSelector.forAll(IndexAccessor.drop);
     _dropAction.drop(_descriptor.Id);
 }
Esempio n. 7
0
 public override void Drop()
 {
     InstanceSelector.forAll(IndexPopulator.drop);
     _dropAction.drop(_indexId);
 }
Esempio n. 8
0
 public override void Create()
 {
     _dropAction.drop(_indexId, _archiveFailedIndex);
     InstanceSelector.forAll(IndexPopulator.create);
 }
Esempio n. 9
0
 public override void MarkAsFailed(string failure)
 {
     InstanceSelector.forAll(populator => populator.markAsFailed(failure));
 }