org.hibernate.search.spi

## Interface WorkerBuildContext

- All Superinterfaces:
    BuildContext
  All Known Implementing Classes:
    ImmutableSearchFactory, MutableSearchFactory

      public interface WorkerBuildContext
      extends BuildContext

  Build context for the worker and other backend Available after all index, entity metadata are built.
  Author:
    Emmanuel Bernard

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `enlistWorkerInTransaction()`
    `InstanceInitializer` | `getInstanceInitializer()`
    `boolean` | `isDeleteByTermEnforced()`
    `boolean` | `isIndexMetadataComplete()`
    `boolean` | `isMultitenancyEnabled()`
    `boolean` | `isTransactionManagerExpected()`

    - ### Methods inherited from interface org.hibernate.search.spi.BuildContext

      `getAllIndexesManager, getErrorHandler, getIndexingMode, getServiceManager, getUninitializedSearchIntegrator`

- - ### Method Detail

    - #### isTransactionManagerExpected

          boolean isTransactionManagerExpected()

      Returns:
        `true` if a transaction manager is expected, `false` otherwise.
      See Also:
        `SearchConfiguration.isTransactionManagerExpected()`

    - #### isIndexMetadataComplete

          boolean isIndexMetadataComplete()

      Returns:
        `true` if it is safe to assume that the information we have about index metadata is accurate. This should be set to false for example if the index could contain Documents related to types not known to this SearchFactory instance.
      See Also:
        `SearchConfiguration.isIndexMetadataComplete()`

    - #### isDeleteByTermEnforced

          boolean isDeleteByTermEnforced()

      Returns:
        `true` if regardless of `isIndexMetadataComplete` and the number of types present in the index it is safe to delete by term given that the underlying store guarantees uniqueness of ids

    - #### getInstanceInitializer

          InstanceInitializer getInstanceInitializer()

      Returns:
        An instance of the `InstanceInitializer` interface.

    - #### isMultitenancyEnabled

          boolean isMultitenancyEnabled()

      Returns:
        `true` if `multitenancy` should be enabled. When in doubt, this should return `true`.

    - #### enlistWorkerInTransaction

          boolean enlistWorkerInTransaction()

      Returns:
        `true` if the worker and the backend enlist their work in the current transaction; If `false`, the worker will still use the transaction as context but will execute the workload when the transaction commits.

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