コード例 #1
0
 internal virtual FulltextIndexTransactionStateVisitor Init(AllStoreHolder read, NodeCursor nodeCursor, RelationshipScanCursor relationshipCursor, PropertyCursor propertyCursor)
 {
     this._read               = read;
     this._nodeCursor         = nodeCursor;
     this._relationshipCursor = relationshipCursor;
     this._propertyCursor     = propertyCursor;
     return(this);
 }
コード例 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void updateReader(org.neo4j.kernel.impl.api.KernelTransactionImplementation kti) throws Exception
        private void UpdateReader(KernelTransactionImplementation kti)
        {
            _modifiedEntityIdsInThisTransaction.clear();               // Clear this so we don't filter out entities who have had their changes reversed since last time.
            _writer.resetWriterState();
            AllStoreHolder   read             = ( AllStoreHolder )kti.DataRead();
            TransactionState transactionState = kti.TxState();

            using (NodeCursor nodeCursor = _visitingNodes ? kti.Cursors().allocateNodeCursor() : null, RelationshipScanCursor relationshipCursor = _visitingNodes ? null : kti.Cursors().allocateRelationshipScanCursor(), PropertyCursor propertyCursor = kti.Cursors().allocatePropertyCursor())
            {
                transactionState.Accept(_txStateVisitor.init(read, nodeCursor, relationshipCursor, propertyCursor));
            }
            FulltextIndexReader baseReader         = ( FulltextIndexReader )read.IndexReader(_descriptor, false);
            FulltextIndexReader nearRealTimeReader = _writer.NearRealTimeReader;

            _currentReader      = new TransactionStateFulltextIndexReader(baseReader, nearRealTimeReader, _modifiedEntityIdsInThisTransaction);
            _lastUpdateRevision = kti.TransactionDataRevision;
        }
コード例 #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public ScoreEntityIterator query(org.neo4j.kernel.api.KernelTransaction ktx, String indexName, String queryString) throws org.neo4j.internal.kernel.api.exceptions.schema.IndexNotFoundKernelException, org.apache.lucene.queryparser.classic.ParseException
        public override ScoreEntityIterator Query(KernelTransaction ktx, string indexName, string queryString)
        {
            KernelTransactionImplementation kti = ( KernelTransactionImplementation )ktx;
            AllStoreHolder      allStoreHolder  = ( AllStoreHolder )kti.DataRead();
            IndexReference      indexReference  = kti.SchemaRead().indexGetForName(indexName);
            FulltextIndexReader fulltextIndexReader;

            if (kti.HasTxStateWithChanges() && !((FulltextSchemaDescriptor)indexReference.Schema()).EventuallyConsistent)
            {
                FulltextAuxiliaryTransactionState auxiliaryTxState = ( FulltextAuxiliaryTransactionState )allStoreHolder.AuxiliaryTxState(TX_STATE_PROVIDER_KEY);
                fulltextIndexReader = auxiliaryTxState.IndexReader(indexReference, kti);
            }
            else
            {
                IndexReader indexReader = allStoreHolder.IndexReader(indexReference, false);
                fulltextIndexReader = ( FulltextIndexReader )indexReader;
            }
            return(fulltextIndexReader.Query(queryString));
        }
コード例 #4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public String indexGetFailure(org.neo4j.internal.kernel.api.IndexReference index) throws org.neo4j.internal.kernel.api.exceptions.schema.IndexNotFoundKernelException
        public override string IndexGetFailure(IndexReference index)
        {
            AllStoreHolder.AssertValidIndex(index);
            return(_snapshot.indexGetFailure(index.Schema()));
        }
コード例 #5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.storageengine.api.schema.PopulationProgress indexGetPopulationProgress(org.neo4j.internal.kernel.api.IndexReference index) throws org.neo4j.internal.kernel.api.exceptions.schema.IndexNotFoundKernelException
        public override PopulationProgress IndexGetPopulationProgress(IndexReference index)
        {
            AllStoreHolder.AssertValidIndex(index);
            _ktx.assertOpen();
            return(_stores.indexGetPopulationProgress(_snapshot, index));
        }
コード例 #6
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.internal.kernel.api.InternalIndexState indexGetState(org.neo4j.internal.kernel.api.IndexReference index) throws org.neo4j.internal.kernel.api.exceptions.schema.IndexNotFoundKernelException
        public override InternalIndexState IndexGetState(IndexReference index)
        {
            AllStoreHolder.AssertValidIndex(index);
            _ktx.assertOpen();
            return(_stores.indexGetState(_snapshot, ( IndexDescriptor )index));
        }
コード例 #7
0
 internal SchemaReadCoreSnapshot(StorageSchemaReader snapshot, KernelTransactionImplementation ktx, AllStoreHolder stores)
 {
     this._snapshot = snapshot;
     this._ktx      = ktx;
     this._stores   = stores;
 }