public override IndexUpdater NewUpdater(IndexUpdateMode mode) { if (LuceneIndex.ReadOnly) { throw new System.NotSupportedException("Can't create updater for read only index."); } return(GetIndexUpdater(mode)); }
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); }
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(); }
public override NativeIndexUpdater <KEY, VALUE> NewUpdater(IndexUpdateMode mode) { assertOpen(); try { return(_singleUpdater.initialize(tree.writer())); } catch (IOException e) { throw new UncheckedIOException(e); } }
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); } }
public void SetStale(IndexUpdateMode stale) { Stale = stale; }
public override IndexUpdater NewUpdater(IndexUpdateMode mode) { return(new SpatialIndexUpdater(this, mode)); }
public virtual void SetStale(IndexUpdateMode stale) { this.stale = stale; }
public void SetStale(IndexUpdateMode stale) { this.stale = stale; }
public MemberUpdateOverriddenMode(IMemberUpdate update, IndexUpdateMode indexUpdateMode) { this._update = update; this.UpdateMode = indexUpdateMode; }
protected internal abstract IndexUpdater GetIndexUpdater(IndexUpdateMode mode);
public override IndexUpdater NewUpdater(IndexUpdateMode mode) { return(Delegate.newUpdater(mode)); }
public override IndexUpdater NewUpdater(IndexUpdateMode mode) { return(SwallowingIndexUpdater.INSTANCE); }
public override IndexUpdater NewUpdater(IndexUpdateMode mode) { LazyInstanceSelector <IndexUpdater> updaterSelector = new LazyInstanceSelector <IndexUpdater>(slot => InstanceSelector.select(slot).newUpdater(mode)); return(new FusionIndexUpdater(SlotSelector, updaterSelector)); }
public MemberUpdateWithMode(IMemberUpdate update, IndexUpdateMode indexUpdateMode) { this._update = update; this.UpdateMode = indexUpdateMode; }