OnIndexOutputClosed() protected method

protected OnIndexOutputClosed ( Lucene.Net.Store.FSIndexOutput io ) : void
io Lucene.Net.Store.FSIndexOutput
return void
コード例 #1
0
ファイル: FSDirectory.cs プロジェクト: zhuthree/lucenenet
 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);
             }
         }
     }
 }
コード例 #2
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);
             }
             catch (IOException ioe)
             {
                 priorE = ioe;
             }
             finally
             {
                 isOpen = false;
                 IOUtils.DisposeWhileHandlingException(priorE, file);
             }
         }
     }
 }
コード例 #3
0
ファイル: FSDirectory.cs プロジェクト: wwb/lucenenet
 public override void Dispose()
 {
     Parent.OnIndexOutputClosed(this);
     // only close the file if it has not been closed yet
     if (IsOpen)
     {
         System.IO.IOException priorE = null;
         try
         {
             base.Dispose();
         }
         catch (System.IO.IOException ioe)
         {
             priorE = ioe;
         }
         finally
         {
             IsOpen = false;
             IOUtils.CloseWhileHandlingException(priorE, File);
         }
     }
 }