org.apache.solr.core

## Class SolrDeletionPolicy

- java.lang.Object
- - org.apache.lucene.index.IndexDeletionPolicy
  - - org.apache.solr.core.SolrDeletionPolicy

- All Implemented Interfaces:
    NamedListInitializedPlugin

      public class SolrDeletionPolicy
      extends IndexDeletionPolicy
      implements NamedListInitializedPlugin

  Standard Solr deletion policy that allows reserving index commit points for certain amounts of time to support features such as index replication or snapshooting directly out of a live index directory.
  See Also:
    `IndexDeletionPolicy`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SolrDeletionPolicy()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getMaxCommitAge()`
    `int` | `getMaxCommitsToKeep()`
    `int` | `getMaxOptimizedCommitsToKeep()`
    `void` | `init(NamedList args)`
    `void` | `onCommit(List<? extends IndexCommit> commits)` Internal use for Lucene...
    `void` | `onInit(List<? extends IndexCommit> commits)` Internal use for Lucene...
    `void` | `setMaxCommitsToKeep(int maxCommitsToKeep)`
    `void` | `setMaxOptimizedCommitsToKeep(int maxOptimizedCommitsToKeep)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SolrDeletionPolicy

          public SolrDeletionPolicy()

  - ### Method Detail

    - #### init

          public void init(NamedList args)

      Specified by:
        `init` in interface `NamedListInitializedPlugin`

    - #### onInit

          public void onInit(List<? extends IndexCommit> commits)
                      throws IOException

      Internal use for Lucene... do not explicitly call.
      Specified by:
        `onInit` in class `IndexDeletionPolicy`
      Throws:
        `IOException`

    - #### onCommit

          public void onCommit(List<? extends IndexCommit> commits)
                        throws IOException

      Internal use for Lucene... do not explicitly call.
      Specified by:
        `onCommit` in class `IndexDeletionPolicy`
      Throws:
        `IOException`

    - #### getMaxCommitAge

          public String getMaxCommitAge()

    - #### getMaxCommitsToKeep

          public int getMaxCommitsToKeep()

    - #### getMaxOptimizedCommitsToKeep

          public int getMaxOptimizedCommitsToKeep()

    - #### setMaxCommitsToKeep

          public void setMaxCommitsToKeep(int maxCommitsToKeep)

    - #### setMaxOptimizedCommitsToKeep

          public void setMaxOptimizedCommitsToKeep(int maxOptimizedCommitsToKeep)

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.