org.hibernate.search.backend.impl.lucene

## Class AbstractCommitPolicy

- java.lang.Object
- - org.hibernate.search.backend.impl.lucene.AbstractCommitPolicy

- All Implemented Interfaces:
    CommitPolicy
  Direct Known Subclasses:
    NRTCommitPolicy, PerChangeSetCommitPolicy, ScheduledCommitPolicy, SharedIndexCommitPolicy

      public abstract class AbstractCommitPolicy
      extends Object
      implements CommitPolicy

  Base class for `CommitPolicy`
  Author:
    gustavonalle

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.hibernate.search.backend.impl.lucene.IndexWriterHolder` | `indexWriterHolder`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractCommitPolicy(org.hibernate.search.backend.impl.lucene.IndexWriterHolder indexWriterHolder)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IndexWriter` | `getIndexWriter()` Obtain the IndexWriter
    `IndexWriter` | `getIndexWriter(ErrorContextBuilder errorContextBuilder)` Obtain the index writer
    `void` | `onClose()` Backend shutting down

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

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

    - ### Methods inherited from interface org.hibernate.search.backend.impl.CommitPolicy

      `onChangeSetApplied, onFlush`

- - ### Field Detail

    - #### indexWriterHolder

          protected final org.hibernate.search.backend.impl.lucene.IndexWriterHolder indexWriterHolder

  - ### Constructor Detail

    - #### AbstractCommitPolicy

          public AbstractCommitPolicy(org.hibernate.search.backend.impl.lucene.IndexWriterHolder indexWriterHolder)

  - ### Method Detail

    - #### getIndexWriter

          public IndexWriter getIndexWriter()

      Description copied from interface: `CommitPolicy`
      Obtain the IndexWriter
      Specified by:
        `getIndexWriter` in interface `CommitPolicy`
      Returns:
        the `IndexWriter`

    - #### getIndexWriter

          public IndexWriter getIndexWriter(ErrorContextBuilder errorContextBuilder)

      Description copied from interface: `CommitPolicy`
      Obtain the index writer
      Specified by:
        `getIndexWriter` in interface `CommitPolicy`
      Parameters:
        `errorContextBuilder` - the `ErrorContextBuilder`
      Returns:
        the `IndexWriter`

    - #### onClose

          public void onClose()

      Description copied from interface: `CommitPolicy`
      Backend shutting down
      Specified by:
        `onClose` in interface `CommitPolicy`

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved