protected OnIndexOutputClosed ( Lucene.Net.Store.FSIndexOutput io ) : void | ||
io | Lucene.Net.Store.FSIndexOutput | |
return | void |
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); } } } }
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); } } } }
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); } } }