org.apache.lucene.replicator

## Class IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter

- java.lang.Object
- - org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
  - - org.apache.lucene.replicator.IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter

- All Implemented Interfaces:
    Closeable, AutoCloseable, TaxonomyWriter, TwoPhaseCommit
  Enclosing class:
    IndexAndTaxonomyRevision

      public static final class IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter
      extends DirectoryTaxonomyWriter

  A `DirectoryTaxonomyWriter` which sets the underlying `IndexWriter`'s `IndexDeletionPolicy` to `SnapshotDeletionPolicy`.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter

      `DirectoryTaxonomyWriter.DiskOrdinalMap, DirectoryTaxonomyWriter.MemoryOrdinalMap, DirectoryTaxonomyWriter.OrdinalMap`

  - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter

      `INDEX_EPOCH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SnapshotDirectoryTaxonomyWriter(Directory d)`
    `SnapshotDirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode)`
    `SnapshotDirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode, TaxonomyWriterCache cache)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected IndexWriterConfig` | `createIndexWriterConfig(IndexWriterConfig.OpenMode openMode)`
    `SnapshotDeletionPolicy` | `getDeletionPolicy()` Returns the `SnapshotDeletionPolicy` used by the underlying `IndexWriter`.
    `IndexWriter` | `getIndexWriter()` Returns the `IndexWriter` used by this `DirectoryTaxonomyWriter`.
    `protected IndexWriter` | `openIndexWriter(Directory directory, IndexWriterConfig config)`

    - ### Methods inherited from class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter

      `addCategory, addTaxonomy, close, closeResources, commit, defaultTaxonomyWriterCache, ensureOpen, findCategory, getDirectory, getLiveCommitData, getParent, getSize, getTaxonomyEpoch, prepareCommit, replaceTaxonomy, rollback, setCacheMissesUntilFill, setLiveCommitData`

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

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

- - ### Constructor Detail

    - #### SnapshotDirectoryTaxonomyWriter

          public SnapshotDirectoryTaxonomyWriter(Directory directory,
                                                 IndexWriterConfig.OpenMode openMode,
                                                 TaxonomyWriterCache cache)
                                          throws IOException

      Throws:
        `IOException`
      See Also:
        `DirectoryTaxonomyWriter.DirectoryTaxonomyWriter(Directory, IndexWriterConfig.OpenMode, TaxonomyWriterCache)`

    - #### SnapshotDirectoryTaxonomyWriter

          public SnapshotDirectoryTaxonomyWriter(Directory directory,
                                                 IndexWriterConfig.OpenMode openMode)
                                          throws IOException

      Throws:
        `IOException`
      See Also:
        `DirectoryTaxonomyWriter.DirectoryTaxonomyWriter(Directory, IndexWriterConfig.OpenMode)`

    - #### SnapshotDirectoryTaxonomyWriter

          public SnapshotDirectoryTaxonomyWriter(Directory d)
                                          throws IOException

      Throws:
        `IOException`
      See Also:
        `DirectoryTaxonomyWriter.DirectoryTaxonomyWriter(Directory)`

  - ### Method Detail

    - #### createIndexWriterConfig

          protected IndexWriterConfig createIndexWriterConfig(IndexWriterConfig.OpenMode openMode)

      Overrides:
        `createIndexWriterConfig` in class `DirectoryTaxonomyWriter`

    - #### openIndexWriter

          protected IndexWriter openIndexWriter(Directory directory,
                                                IndexWriterConfig config)
                                         throws IOException

      Overrides:
        `openIndexWriter` in class `DirectoryTaxonomyWriter`
      Throws:
        `IOException`

    - #### getDeletionPolicy

          public SnapshotDeletionPolicy getDeletionPolicy()

      Returns the `SnapshotDeletionPolicy` used by the underlying `IndexWriter`.

    - #### getIndexWriter

          public IndexWriter getIndexWriter()

      Returns the `IndexWriter` used by this `DirectoryTaxonomyWriter`.

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