コード例 #1
0
 public override IndexUpdater NewUpdater(IndexUpdateMode mode)
 {
     if (LuceneIndex.ReadOnly)
     {
         throw new System.NotSupportedException("Can't create updater for read only index.");
     }
     return(GetIndexUpdater(mode));
 }
コード例 #2
0
        public override IndexUpdater GetIndexUpdater(IndexUpdateMode mode)
        {
            IndexUpdater indexUpdater = new FulltextIndexUpdater(this, mode.requiresIdempotency(), mode.requiresRefresh());

            if (_descriptor.EventuallyConsistent)
            {
                indexUpdater = new EventuallyConsistentIndexUpdater(LuceneIndex, indexUpdater, _indexUpdateSink);
            }
            return(indexUpdater);
        }
コード例 #3
0
        internal void Add(T item, IndexUpdateMode indexUpdateMode, bool isUniqueIndex)
        {
            this.Values.Add(item);
            if (indexUpdateMode == IndexUpdateMode.Tentative)
            {
                this.SetTentativeInsert();
                return;
            }

            // No condition check is necessary: if the flag is set, we will unset it, and if it's unset, we will unset it again, which is a no-op.
            this.ClearTentativeFlag();
        }
コード例 #4
0
 public override NativeIndexUpdater <KEY, VALUE> NewUpdater(IndexUpdateMode mode)
 {
     assertOpen();
     try
     {
         return(_singleUpdater.initialize(tree.writer()));
     }
     catch (IOException e)
     {
         throw new UncheckedIOException(e);
     }
 }
コード例 #5
0
        internal void Remove(T item, IndexUpdateMode indexUpdateMode, bool isUniqueIndex)
        {
            if (indexUpdateMode == IndexUpdateMode.Tentative)
            {
                this.SetTentativeDelete();
                return;
            }

            // In order to make the index update operations idempotent, non-transactional unique indexes must only do their action if the index entry
            // is still marked as tentative. Otherwise, it means that tentative flag was removed by an earlier attempt and should not be done again.
            // There is no concern about non-unique indexes, because they cannot affect the operations among different grains and therefore
            // cannot fail the operations on other grains.
            if (!isUniqueIndex || indexUpdateMode == IndexUpdateMode.Transactional || this.IsTentative)
            {
                this.ClearTentativeFlag();
                this.Values.Remove(item);
            }
        }
コード例 #6
0
 public void SetStale(IndexUpdateMode stale)
 {
     Stale = stale;
 }
コード例 #7
0
 public override IndexUpdater NewUpdater(IndexUpdateMode mode)
 {
     return(new SpatialIndexUpdater(this, mode));
 }
コード例 #8
0
		public virtual void SetStale(IndexUpdateMode stale)
		{
			this.stale = stale;
		}
コード例 #9
0
 public void SetStale(IndexUpdateMode stale)
 {
     this.stale = stale;
 }
コード例 #10
0
 public MemberUpdateOverriddenMode(IMemberUpdate update, IndexUpdateMode indexUpdateMode)
 {
     this._update    = update;
     this.UpdateMode = indexUpdateMode;
 }
コード例 #11
0
 protected internal abstract IndexUpdater GetIndexUpdater(IndexUpdateMode mode);
コード例 #12
0
ファイル: IndexAccessor.cs プロジェクト: Neo4Net/Neo4Net
 public override IndexUpdater NewUpdater(IndexUpdateMode mode)
 {
     return(Delegate.newUpdater(mode));
 }
コード例 #13
0
ファイル: IndexAccessor.cs プロジェクト: Neo4Net/Neo4Net
 public override IndexUpdater NewUpdater(IndexUpdateMode mode)
 {
     return(SwallowingIndexUpdater.INSTANCE);
 }
コード例 #14
0
        public override IndexUpdater NewUpdater(IndexUpdateMode mode)
        {
            LazyInstanceSelector <IndexUpdater> updaterSelector = new LazyInstanceSelector <IndexUpdater>(slot => InstanceSelector.select(slot).newUpdater(mode));

            return(new FusionIndexUpdater(SlotSelector, updaterSelector));
        }
コード例 #15
0
 public MemberUpdateWithMode(IMemberUpdate update, IndexUpdateMode indexUpdateMode)
 {
     this._update    = update;
     this.UpdateMode = indexUpdateMode;
 }