org.hibernate.search.backend.impl

## Interface CommitPolicy

- All Known Implementing Classes:
    AbstractCommitPolicy, NRTCommitPolicy, PerChangeSetCommitPolicy, ScheduledCommitPolicy, SharedIndexCommitPolicy

      public interface CommitPolicy

  Policy for committing changesets. Implementations of this interface will decide the commit strategy based of three backend related events: after a changeset is applied, when an explicit flush is requested and when backend closing
  Author:
    gustavonalle

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `IndexWriter` | `getIndexWriter()` Obtain the IndexWriter
    `IndexWriter` | `getIndexWriter(ErrorContextBuilder errorContextBuilder)` Obtain the index writer
    `void` | `onChangeSetApplied(boolean someFailureHappened, boolean streaming)` A changeset was applied to the index
    `void` | `onClose()` Backend shutting down
    `void` | `onFlush()` An explicit flush was requested

- - ### Method Detail

    - #### onChangeSetApplied

          void onChangeSetApplied(boolean someFailureHappened,
                                  boolean streaming)

      A changeset was applied to the index
      Parameters:
        `someFailureHappened` - true if any failure happened
        `streaming` - true if changesets are part of a stream of operations

    - #### onFlush

          void onFlush()

      An explicit flush was requested

    - #### onClose

          void onClose()

      Backend shutting down

    - #### getIndexWriter

          IndexWriter getIndexWriter()

      Obtain the IndexWriter
      Returns:
        the `IndexWriter`

    - #### getIndexWriter

          IndexWriter getIndexWriter(ErrorContextBuilder errorContextBuilder)

      Obtain the index writer
      Parameters:
        `errorContextBuilder` - the `ErrorContextBuilder`
      Returns:
        the `IndexWriter`

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