| <!DOCTYPE html> |
| <!--[if IE]><![endif]--> |
| <html> |
| |
| <head> |
| <meta charset="utf-8"> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| <title>Class SnapshotDeletionPolicy |
| | Apache Lucene.NET 4.8.0-beta00010 Documentation </title> |
| <meta name="viewport" content="width=device-width"> |
| <meta name="title" content="Class SnapshotDeletionPolicy |
| | Apache Lucene.NET 4.8.0-beta00010 Documentation "> |
| <meta name="generator" content="docfx 2.56.0.0"> |
| |
| <link rel="shortcut icon" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/favicon.ico"> |
| <link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.css"> |
| <link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.css"> |
| <link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.css"> |
| <meta property="docfx:navrel" content="toc.html"> |
| <meta property="docfx:tocrel" content="core/toc.html"> |
| |
| <meta property="docfx:rel" content="https://lucenenet.apache.org/docs/4.8.0-beta00009/"> |
| |
| </head> |
| <body data-spy="scroll" data-target="#affix" data-offset="120"> |
| <div id="wrapper"> |
| <header> |
| |
| <nav id="autocollapse" class="navbar ng-scope" role="navigation"> |
| <div class="container"> |
| <div class="navbar-header"> |
| <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> |
| <span class="sr-only">Toggle navigation</span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| </button> |
| |
| <a class="navbar-brand" href="/"> |
| <img id="logo" class="svg" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/lucene-net-color.png" alt=""> |
| </a> |
| </div> |
| <div class="collapse navbar-collapse" id="navbar"> |
| <form class="navbar-form navbar-right" role="search" id="search"> |
| <div class="form-group"> |
| <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off"> |
| </div> |
| </form> |
| </div> |
| </div> |
| </nav> |
| |
| <div class="subnav navbar navbar-default"> |
| <div class="container hide-when-search"> |
| <ul class="level0 breadcrumb"> |
| <li> |
| <a href="https://lucenenet.apache.org/docs/4.8.0-beta00009/">API</a> |
| <span id="breadcrumb"> |
| <ul class="breadcrumb"> |
| <li></li> |
| </ul> |
| </span> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </header> |
| <div class="container body-content"> |
| |
| <div id="search-results"> |
| <div class="search-list"></div> |
| <div class="sr-items"> |
| <p><i class="glyphicon glyphicon-refresh index-loading"></i></p> |
| </div> |
| <ul id="pagination"></ul> |
| </div> |
| </div> |
| <div role="main" class="container body-content hide-when-search"> |
| |
| <div class="sidenav hide-when-search"> |
| <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a> |
| <div class="sidetoggle collapse" id="sidetoggle"> |
| <div id="sidetoc"></div> |
| </div> |
| </div> |
| <div class="article row grid-right"> |
| <div class="col-md-10"> |
| <article class="content wrap" id="_content" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy"> |
| |
| |
| <h1 id="Lucene_Net_Index_SnapshotDeletionPolicy" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy" class="text-break">Class SnapshotDeletionPolicy |
| </h1> |
| <div class="markdown level0 summary"><p>An <a class="xref" href="Lucene.Net.Index.IndexDeletionPolicy.html">IndexDeletionPolicy</a> that wraps any other |
| <a class="xref" href="Lucene.Net.Index.IndexDeletionPolicy.html">IndexDeletionPolicy</a> and adds the ability to hold and later release |
| snapshots of an index. While a snapshot is held, the <a class="xref" href="Lucene.Net.Index.IndexWriter.html">IndexWriter</a> will |
| not remove any files associated with it even if the index is otherwise being |
| actively, arbitrarily changed. Because we wrap another arbitrary |
| <a class="xref" href="Lucene.Net.Index.IndexDeletionPolicy.html">IndexDeletionPolicy</a>, this gives you the freedom to continue using |
| whatever <a class="xref" href="Lucene.Net.Index.IndexDeletionPolicy.html">IndexDeletionPolicy</a> you would normally want to use with your |
| index.</p> |
| <p><p> |
| This class maintains all snapshots in-memory, and so the information is not |
| persisted and not protected against system failures. If persistence is |
| important, you can use <a class="xref" href="Lucene.Net.Index.PersistentSnapshotDeletionPolicy.html">PersistentSnapshotDeletionPolicy</a>. |
| <p> |
| <div class="lucene-block lucene-experimental">This is a Lucene.NET EXPERIMENTAL API, use at your own risk</div></div> |
| <div class="markdown level0 conceptual"></div> |
| <div class="inheritance"> |
| <h5>Inheritance</h5> |
| <div class="level0"><span class="xref">System.Object</span></div> |
| <div class="level1"><a class="xref" href="Lucene.Net.Index.IndexDeletionPolicy.html">IndexDeletionPolicy</a></div> |
| <div class="level2"><span class="xref">SnapshotDeletionPolicy</span></div> |
| <div class="level3"><a class="xref" href="Lucene.Net.Index.PersistentSnapshotDeletionPolicy.html">PersistentSnapshotDeletionPolicy</a></div> |
| </div> |
| <div class="inheritedMembers"> |
| <h5>Inherited Members</h5> |
| <div> |
| <span class="xref">System.Object.Equals(System.Object)</span> |
| </div> |
| <div> |
| <span class="xref">System.Object.Equals(System.Object, System.Object)</span> |
| </div> |
| <div> |
| <span class="xref">System.Object.GetHashCode()</span> |
| </div> |
| <div> |
| <span class="xref">System.Object.GetType()</span> |
| </div> |
| <div> |
| <span class="xref">System.Object.MemberwiseClone()</span> |
| </div> |
| <div> |
| <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span> |
| </div> |
| <div> |
| <span class="xref">System.Object.ToString()</span> |
| </div> |
| </div> |
| <h6><strong>Namespace</strong>: <a class="xref" href="Lucene.Net.Index.html">Lucene.Net.Index</a></h6> |
| <h6><strong>Assembly</strong>: Lucene.Net.dll</h6> |
| <h5 id="Lucene_Net_Index_SnapshotDeletionPolicy_syntax">Syntax</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public class SnapshotDeletionPolicy : IndexDeletionPolicy</code></pre> |
| </div> |
| <h3 id="constructors">Constructors |
| </h3> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_SnapshotDeletionPolicy__ctor_Lucene_Net_Index_IndexDeletionPolicy_.md&value=---%0Auid%3A%20Lucene.Net.Index.SnapshotDeletionPolicy.%23ctor(Lucene.Net.Index.IndexDeletionPolicy)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Index/SnapshotDeletionPolicy.cs/#L71">View Source</a> |
| </span> |
| <a id="Lucene_Net_Index_SnapshotDeletionPolicy__ctor_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.#ctor*"></a> |
| <h4 id="Lucene_Net_Index_SnapshotDeletionPolicy__ctor_Lucene_Net_Index_IndexDeletionPolicy_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.#ctor(Lucene.Net.Index.IndexDeletionPolicy)">SnapshotDeletionPolicy(IndexDeletionPolicy)</h4> |
| <div class="markdown level1 summary"><p>Sole constructor, taking the incoming |
| <a class="xref" href="Lucene.Net.Index.IndexDeletionPolicy.html">IndexDeletionPolicy</a> to wrap.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public SnapshotDeletionPolicy(IndexDeletionPolicy primary)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Index.IndexDeletionPolicy.html">IndexDeletionPolicy</a></td> |
| <td><span class="parametername">primary</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="fields">Fields |
| </h3> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_SnapshotDeletionPolicy_m_indexCommits.md&value=---%0Auid%3A%20Lucene.Net.Index.SnapshotDeletionPolicy.m_indexCommits%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Index/SnapshotDeletionPolicy.cs/#L53">View Source</a> |
| </span> |
| <h4 id="Lucene_Net_Index_SnapshotDeletionPolicy_m_indexCommits" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.m_indexCommits">m_indexCommits</h4> |
| <div class="markdown level1 summary"><p>Used to map gen to <a class="xref" href="Lucene.Net.Index.IndexCommit.html">IndexCommit</a>. </p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">protected IDictionary<long?, IndexCommit> m_indexCommits</code></pre> |
| </div> |
| <h5 class="fieldValue">Field Value</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Collections.Generic.IDictionary</span><<span class="xref">System.Nullable</span><<span class="xref">System.Int64</span>>, <a class="xref" href="Lucene.Net.Index.IndexCommit.html">IndexCommit</a>></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_SnapshotDeletionPolicy_m_lastCommit.md&value=---%0Auid%3A%20Lucene.Net.Index.SnapshotDeletionPolicy.m_lastCommit%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Index/SnapshotDeletionPolicy.cs/#L61">View Source</a> |
| </span> |
| <h4 id="Lucene_Net_Index_SnapshotDeletionPolicy_m_lastCommit" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.m_lastCommit">m_lastCommit</h4> |
| <div class="markdown level1 summary"><p>Most recently committed <a class="xref" href="Lucene.Net.Index.IndexCommit.html">IndexCommit</a>. </p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">protected IndexCommit m_lastCommit</code></pre> |
| </div> |
| <h5 class="fieldValue">Field Value</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Index.IndexCommit.html">IndexCommit</a></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_SnapshotDeletionPolicy_m_refCounts.md&value=---%0Auid%3A%20Lucene.Net.Index.SnapshotDeletionPolicy.m_refCounts%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Index/SnapshotDeletionPolicy.cs/#L49">View Source</a> |
| </span> |
| <h4 id="Lucene_Net_Index_SnapshotDeletionPolicy_m_refCounts" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.m_refCounts">m_refCounts</h4> |
| <div class="markdown level1 summary"><p>Records how many snapshots are held against each |
| commit generation</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">protected IDictionary<long, int> m_refCounts</code></pre> |
| </div> |
| <h5 class="fieldValue">Field Value</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Collections.Generic.IDictionary</span><<span class="xref">System.Int64</span>, <span class="xref">System.Int32</span>></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="properties">Properties |
| </h3> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_SnapshotDeletionPolicy_SnapshotCount.md&value=---%0Auid%3A%20Lucene.Net.Index.SnapshotDeletionPolicy.SnapshotCount%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Index/SnapshotDeletionPolicy.cs/#L216">View Source</a> |
| </span> |
| <a id="Lucene_Net_Index_SnapshotDeletionPolicy_SnapshotCount_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.SnapshotCount*"></a> |
| <h4 id="Lucene_Net_Index_SnapshotDeletionPolicy_SnapshotCount" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.SnapshotCount">SnapshotCount</h4> |
| <div class="markdown level1 summary"><p>Returns the total number of snapshots currently held. </p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual int SnapshotCount { get; }</code></pre> |
| </div> |
| <h5 class="propertyValue">Property Value</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Int32</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="methods">Methods |
| </h3> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_SnapshotDeletionPolicy_Clone.md&value=---%0Auid%3A%20Lucene.Net.Index.SnapshotDeletionPolicy.Clone%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Index/SnapshotDeletionPolicy.cs/#L246">View Source</a> |
| </span> |
| <a id="Lucene_Net_Index_SnapshotDeletionPolicy_Clone_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.Clone*"></a> |
| <h4 id="Lucene_Net_Index_SnapshotDeletionPolicy_Clone" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.Clone">Clone()</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public override object Clone()</code></pre> |
| </div> |
| <h5 class="returns">Returns</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Object</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 class="overrides">Overrides</h5> |
| <div><a class="xref" href="Lucene.Net.Index.IndexDeletionPolicy.html#Lucene_Net_Index_IndexDeletionPolicy_Clone">IndexDeletionPolicy.Clone()</a></div> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_SnapshotDeletionPolicy_GetIndexCommit_System_Int64_.md&value=---%0Auid%3A%20Lucene.Net.Index.SnapshotDeletionPolicy.GetIndexCommit(System.Int64)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Index/SnapshotDeletionPolicy.cs/#L238">View Source</a> |
| </span> |
| <a id="Lucene_Net_Index_SnapshotDeletionPolicy_GetIndexCommit_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.GetIndexCommit*"></a> |
| <h4 id="Lucene_Net_Index_SnapshotDeletionPolicy_GetIndexCommit_System_Int64_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.GetIndexCommit(System.Int64)">GetIndexCommit(Int64)</h4> |
| <div class="markdown level1 summary"><p>Retrieve an <a class="xref" href="Lucene.Net.Index.IndexCommit.html">IndexCommit</a> from its generation; |
| returns <code>null</code> if this <a class="xref" href="Lucene.Net.Index.IndexCommit.html">IndexCommit</a> is not currently |
| snapshotted</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual IndexCommit GetIndexCommit(long gen)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Int64</span></td> |
| <td><span class="parametername">gen</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 class="returns">Returns</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Index.IndexCommit.html">IndexCommit</a></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_SnapshotDeletionPolicy_GetSnapshots.md&value=---%0Auid%3A%20Lucene.Net.Index.SnapshotDeletionPolicy.GetSnapshots%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Index/SnapshotDeletionPolicy.cs/#L206">View Source</a> |
| </span> |
| <a id="Lucene_Net_Index_SnapshotDeletionPolicy_GetSnapshots_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.GetSnapshots*"></a> |
| <h4 id="Lucene_Net_Index_SnapshotDeletionPolicy_GetSnapshots" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.GetSnapshots">GetSnapshots()</h4> |
| <div class="markdown level1 summary"><p>Returns all <a class="xref" href="Lucene.Net.Index.IndexCommit.html">IndexCommit</a>s held by at least one snapshot. </p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual IList<IndexCommit> GetSnapshots()</code></pre> |
| </div> |
| <h5 class="returns">Returns</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Collections.Generic.IList</span><<a class="xref" href="Lucene.Net.Index.IndexCommit.html">IndexCommit</a>></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_SnapshotDeletionPolicy_IncRef_Lucene_Net_Index_IndexCommit_.md&value=---%0Auid%3A%20Lucene.Net.Index.SnapshotDeletionPolicy.IncRef(Lucene.Net.Index.IndexCommit)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Index/SnapshotDeletionPolicy.cs/#L148">View Source</a> |
| </span> |
| <a id="Lucene_Net_Index_SnapshotDeletionPolicy_IncRef_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.IncRef*"></a> |
| <h4 id="Lucene_Net_Index_SnapshotDeletionPolicy_IncRef_Lucene_Net_Index_IndexCommit_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.IncRef(Lucene.Net.Index.IndexCommit)">IncRef(IndexCommit)</h4> |
| <div class="markdown level1 summary"><p>Increments the refCount for this <a class="xref" href="Lucene.Net.Index.IndexCommit.html">IndexCommit</a>. </p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">protected virtual void IncRef(IndexCommit ic)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Index.IndexCommit.html">IndexCommit</a></td> |
| <td><span class="parametername">ic</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_SnapshotDeletionPolicy_OnCommit__1_System_Collections_Generic_IList___0__.md&value=---%0Auid%3A%20Lucene.Net.Index.SnapshotDeletionPolicy.OnCommit%60%601(System.Collections.Generic.IList%7B%60%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Index/SnapshotDeletionPolicy.cs/#L76">View Source</a> |
| </span> |
| <a id="Lucene_Net_Index_SnapshotDeletionPolicy_OnCommit_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.OnCommit*"></a> |
| <h4 id="Lucene_Net_Index_SnapshotDeletionPolicy_OnCommit__1_System_Collections_Generic_IList___0__" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.OnCommit``1(System.Collections.Generic.IList{``0})">OnCommit<T>(IList<T>)</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public override void OnCommit<T>(IList<T> commits) |
| where T : IndexCommit</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Collections.Generic.IList</span><T></td> |
| <td><span class="parametername">commits</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 class="typeParameters">Type Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="parametername">T</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 class="overrides">Overrides</h5> |
| <div><span class="xref">Lucene.Net.Index.IndexDeletionPolicy.OnCommit<T>(System.Collections.Generic.IList<T>)</span></div> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_SnapshotDeletionPolicy_OnInit__1_System_Collections_Generic_IList___0__.md&value=---%0Auid%3A%20Lucene.Net.Index.SnapshotDeletionPolicy.OnInit%60%601(System.Collections.Generic.IList%7B%60%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Index/SnapshotDeletionPolicy.cs/#L85">View Source</a> |
| </span> |
| <a id="Lucene_Net_Index_SnapshotDeletionPolicy_OnInit_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.OnInit*"></a> |
| <h4 id="Lucene_Net_Index_SnapshotDeletionPolicy_OnInit__1_System_Collections_Generic_IList___0__" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.OnInit``1(System.Collections.Generic.IList{``0})">OnInit<T>(IList<T>)</h4> |
| <div class="markdown level1 summary"></div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public override void OnInit<T>(IList<T> commits) |
| where T : IndexCommit</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Collections.Generic.IList</span><T></td> |
| <td><span class="parametername">commits</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 class="typeParameters">Type Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="parametername">T</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 class="overrides">Overrides</h5> |
| <div><span class="xref">Lucene.Net.Index.IndexDeletionPolicy.OnInit<T>(System.Collections.Generic.IList<T>)</span></div> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_SnapshotDeletionPolicy_Release_Lucene_Net_Index_IndexCommit_.md&value=---%0Auid%3A%20Lucene.Net.Index.SnapshotDeletionPolicy.Release(Lucene.Net.Index.IndexCommit)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Index/SnapshotDeletionPolicy.cs/#L110">View Source</a> |
| </span> |
| <a id="Lucene_Net_Index_SnapshotDeletionPolicy_Release_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.Release*"></a> |
| <h4 id="Lucene_Net_Index_SnapshotDeletionPolicy_Release_Lucene_Net_Index_IndexCommit_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.Release(Lucene.Net.Index.IndexCommit)">Release(IndexCommit)</h4> |
| <div class="markdown level1 summary"><p>Release a snapshotted commit.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual void Release(IndexCommit commit)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Index.IndexCommit.html">IndexCommit</a></td> |
| <td><span class="parametername">commit</span></td> |
| <td><p>the commit previously returned by <a class="xref" href="Lucene.Net.Index.SnapshotDeletionPolicy.html#Lucene_Net_Index_SnapshotDeletionPolicy_Snapshot">Snapshot()</a> </p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_SnapshotDeletionPolicy_ReleaseGen_System_Int64_.md&value=---%0Auid%3A%20Lucene.Net.Index.SnapshotDeletionPolicy.ReleaseGen(System.Int64)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Index/SnapshotDeletionPolicy.cs/#L121">View Source</a> |
| </span> |
| <a id="Lucene_Net_Index_SnapshotDeletionPolicy_ReleaseGen_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.ReleaseGen*"></a> |
| <h4 id="Lucene_Net_Index_SnapshotDeletionPolicy_ReleaseGen_System_Int64_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.ReleaseGen(System.Int64)">ReleaseGen(Int64)</h4> |
| <div class="markdown level1 summary"><p>Release a snapshot by generation. </p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">protected virtual void ReleaseGen(long gen)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.Int64</span></td> |
| <td><span class="parametername">gen</span></td> |
| <td></td> |
| </tr> |
| </tbody> |
| </table> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_SnapshotDeletionPolicy_Snapshot.md&value=---%0Auid%3A%20Lucene.Net.Index.SnapshotDeletionPolicy.Snapshot%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Index/SnapshotDeletionPolicy.cs/#L184">View Source</a> |
| </span> |
| <a id="Lucene_Net_Index_SnapshotDeletionPolicy_Snapshot_" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.Snapshot*"></a> |
| <h4 id="Lucene_Net_Index_SnapshotDeletionPolicy_Snapshot" data-uid="Lucene.Net.Index.SnapshotDeletionPolicy.Snapshot">Snapshot()</h4> |
| <div class="markdown level1 summary"><p>Snapshots the last commit and returns it. Once a commit is 'snapshotted,' it is protected |
| from deletion (as long as this <a class="xref" href="Lucene.Net.Index.IndexDeletionPolicy.html">IndexDeletionPolicy</a> is used). The |
| snapshot can be removed by calling <a class="xref" href="Lucene.Net.Index.SnapshotDeletionPolicy.html#Lucene_Net_Index_SnapshotDeletionPolicy_Release_Lucene_Net_Index_IndexCommit_">Release(IndexCommit)</a> followed |
| by a call to <a class="xref" href="Lucene.Net.Index.IndexWriter.html#Lucene_Net_Index_IndexWriter_DeleteUnusedFiles">DeleteUnusedFiles()</a>.</p> |
| <p><p> |
| <strong>NOTE:</strong> while the snapshot is held, the files it references will not |
| be deleted, which will consume additional disk space in your index. If you |
| take a snapshot at a particularly bad time (say just before you call |
| <a class="xref" href="Lucene.Net.Index.IndexWriter.html#Lucene_Net_Index_IndexWriter_ForceMerge_System_Int32_">ForceMerge(Int32)</a>) then in the worst case this could consume an extra 1X of your |
| total index size, until you release the snapshot.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public virtual IndexCommit Snapshot()</code></pre> |
| </div> |
| <h5 class="returns">Returns</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="Lucene.Net.Index.IndexCommit.html">IndexCommit</a></td> |
| <td><p>the <a class="xref" href="Lucene.Net.Index.IndexCommit.html">IndexCommit</a> that was snapshotted. </p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 class="exceptions">Exceptions</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Condition</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><span class="xref">System.InvalidOperationException</span></td> |
| <td><p>if this index does not have any commits yet </p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </article> |
| </div> |
| |
| <div class="hidden-sm col-md-2" role="complementary"> |
| <div class="sideaffix"> |
| <div class="contribution"> |
| <ul class="nav"> |
| <li> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Index_SnapshotDeletionPolicy.md&value=---%0Auid%3A%20Lucene.Net.Index.SnapshotDeletionPolicy%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a> |
| </li> |
| <li> |
| <a href="https://github.com/apache/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Index/SnapshotDeletionPolicy.cs/#L43" class="contribution-link">View Source</a> |
| </li> |
| </ul> |
| </div> |
| <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix"> |
| <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> --> |
| </nav> |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| <footer> |
| <div class="grad-bottom"></div> |
| <div class="footer"> |
| <div class="container"> |
| <span class="pull-right"> |
| <a href="#top">Back to top</a> |
| </span> |
| Copyright © 2020 Licensed to the Apache Software Foundation (ASF) |
| |
| </div> |
| </div> |
| </footer> |
| </div> |
| |
| <script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.js"></script> |
| <script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.js"></script> |
| <script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.js"></script> |
| </body> |
| </html> |