Lucene.Net.Index.ReadersAndUpdates.GetReaderForMerge C# (CSharp) Метод

GetReaderForMerge() приватный Метод

Returns a reader for merge. this method applies field updates if there are any and marks that this segment is currently merging.
private GetReaderForMerge ( IOContext context ) : Lucene.Net.Index.SegmentReader
context IOContext
Результат Lucene.Net.Index.SegmentReader
        internal virtual SegmentReader GetReaderForMerge(IOContext context)
        {
            lock (this)
            {
                //Debug.Assert(Thread.holdsLock(Writer));
                // must execute these two statements as atomic operation, otherwise we
                // could lose updates if e.g. another thread calls writeFieldUpdates in
                // between, or the updates are applied to the obtained reader, but then
                // re-applied in IW.commitMergedDeletes (unnecessary work and potential
                // bugs).
                IsMerging = true;
                return GetReader(context);
            }
        }