Esempio n. 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void process(org.neo4j.kernel.api.index.IndexEntryUpdate<?> update) throws org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException
        public override void Process <T1>(IndexEntryUpdate <T1> update)
        {
            IndexUpdater to = Select(update.Values()[0].valueGroup());

            switch (update.UpdateMode())
            {
            case ADDED:
            case REMOVED:
                to.Process(update);
                break;

            case CHANGED:
                IndexUpdater from = Select(update.BeforeValues()[0].valueGroup());
                // There are two cases:
                // - both before/after go into the same updater --> pass update into that updater
                if (from == to)
                {
                    from.Process(update);
                }
                // - before go into one and after into the other --> REMOVED from one and ADDED into the other
                else
                {
                    from.Process(IndexEntryUpdate.remove(update.EntityId, update.IndexKey(), update.BeforeValues()));
                    to.Process(IndexEntryUpdate.add(update.EntityId, update.IndexKey(), update.Values()));
                }
                break;

            default:
                throw new System.ArgumentException("Unknown update mode");
            }
        }
Esempio n. 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void generateUpdates(org.neo4j.kernel.api.impl.schema.LuceneIndexAccessor indexAccessor, int nodesToUpdate) throws org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException
        private void GenerateUpdates(LuceneIndexAccessor indexAccessor, int nodesToUpdate)
        {
            using (IndexUpdater updater = indexAccessor.NewUpdater(IndexUpdateMode.ONLINE))
            {
                for (int nodeId = 0; nodeId < nodesToUpdate; nodeId++)
                {
                    updater.Process(Add(nodeId, nodeId));
                }
            }
        }
Esempio n. 3
0
 public DelegatingIndexUpdater(IndexUpdater @delegate)
 {
     this.Delegate = @delegate;
 }
Esempio n. 4
0
 public UpdateCountingIndexUpdater(IndexStoreView storeView, long indexId, IndexUpdater @delegate)
 {
     this._storeView = storeView;
     this._indexId   = indexId;
     this.@delegate  = @delegate;
 }
Esempio n. 5
0
 public override void CloseUpdater <T1>(DatabaseIndex <T1> index, IndexUpdater indexUpdater) where T1 : Org.Neo4j.Storageengine.Api.schema.IndexReader
 {
 }
Esempio n. 6
0
 public override void EnqueueUpdate <T1, T2>(DatabaseIndex <T1> index, IndexUpdater indexUpdater, IndexEntryUpdate <T2> update) where T1 : Org.Neo4j.Storageengine.Api.schema.IndexReader
 {
 }