Lucene.Net.Store.FSDirectory.OnIndexOutputClosed C# (CSharp) Method

OnIndexOutputClosed() protected method

protected OnIndexOutputClosed ( Lucene.Net.Store.FSIndexOutput io ) : void
io Lucene.Net.Store.FSIndexOutput
return void
        protected internal virtual void OnIndexOutputClosed(FSIndexOutput io)
        {
            StaleFiles.Add(io.Name);
        }

Usage Example

示例#1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         parent.OnIndexOutputClosed(this);
         // only close the file if it has not been closed yet
         if (isOpen)
         {
             IOException priorE = null;
             try
             {
                 base.Dispose(disposing);
                 // LUCENENET specific - file.Flush(flushToDisk: true) required in .NET for concurrency
                 // Part of a solution suggested by Vincent Van Den Berghe: http://apache.markmail.org/message/hafnuhq2ydhfjmi2
                 file.Flush(flushToDisk: true);
             }
             catch (IOException ioe)
             {
                 priorE = ioe;
             }
             finally
             {
                 isOpen = false;
                 IOUtils.DisposeWhileHandlingException(priorE, file);
             }
         }
     }
 }
All Usage Examples Of Lucene.Net.Store.FSDirectory::OnIndexOutputClosed