## 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, 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
`IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter(Directory d)`
`IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode)`
`IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode, TaxonomyWriterCache cache)`

Method Summary
`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, getCommitData, getDirectory, getParent, getSize, getTaxonomyEpoch, prepareCommit, replaceTaxonomy, rollback, setCacheMissesUntilFill, setCommitData, setDelimiter, unlock`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter

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

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

### IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter

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

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

### IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter

    public IndexAndTaxonomyRevision.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-2013 Apache Software Foundation. All Rights Reserved.