Lucene.Net.Index.DirectoryReader.DoClose C# (CSharp) Метод

DoClose() защищенный Метод

protected DoClose ( ) : void
Результат void
        protected internal override void  DoClose()
        {
            lock (this)
            {
                System.IO.IOException ioe = null;
                normsCache = null;
                foreach (SegmentReader t in subReaders)
                {
					// try to close each reader, even if an exception is thrown
                	try
                	{
                		t.DecRef();
                	}
                	catch (System.IO.IOException e)
                	{
                		if (ioe == null)
                			ioe = e;
                	}
                }

            	// NOTE: only needed in case someone had asked for
                // FieldCache for top-level reader (which is generally
                // not a good idea):
                Search.FieldCache_Fields.DEFAULT.Purge(this);

                // throw the first exception
                if (ioe != null)
                    throw ioe;
            }
        }

Usage Example

Пример #1
0
 protected internal override void DoClose()
 {
     m_input.DoClose();
 }