org.hibernate.search.spi

## Interface BuildContext

- All Known Subinterfaces:
    WorkerBuildContext
  All Known Implementing Classes:
    ImmutableSearchFactory, MutableSearchFactory

      public interface BuildContext

  Build context that can be used by some services at initialization.
  Author:
    Emmanuel Bernard, Hardy Ferentschik

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `IndexManagerHolder` | `getAllIndexesManager()`
    `ErrorHandler` | `getErrorHandler()` Back-ends processing work asynchronously should catch all eventual errors in the `ErrorHandler` to avoid losing information about the failing index updates.
    `IndexingMode` | `getIndexingMode()`
    `ServiceManager` | `getServiceManager()` Access the `ServiceManager`.
    `ExtendedSearchIntegrator` | `getUninitializedSearchIntegrator()` Returns the `ExtendedSearchIntegrator` instance.

- - ### Method Detail

    - #### getUninitializedSearchIntegrator

          ExtendedSearchIntegrator getUninitializedSearchIntegrator()

      Returns the `ExtendedSearchIntegrator` instance. Do not use until after the initialize and/or start method is fully executed. Implementations should not cache values provided by the `ExtendedSearchIntegrator`, but rather access them each time, because the configuration can be dynamically updated and new changes made available. For example, prefer:

            void method() {
             int size = sfi.getDirectoryProviders().size();
           }

      over

            void method() {
           int size = directoryProviders.size();
           }

      where directoryProviders is a class variable.
      Returns:
        the `ExtendedSearchIntegrator` instance

    - #### getIndexingMode

          IndexingMode getIndexingMode()

      Returns:
        the current indexing strategy as specified via `Environment.INDEXING_STRATEGY`.

    - #### getServiceManager

          ServiceManager getServiceManager()

      Access the `ServiceManager`. Clients should keep a reference to the `ServiceManager` to allow for cleanup, but should not keep a reference to the `BuildContext`.
      Returns:
        the `ServiceManager`

    - #### getAllIndexesManager

          IndexManagerHolder getAllIndexesManager()

      Returns:
        a reference to the `IndexManagerHolder`, storing all `IndexManager` instances.

    - #### getErrorHandler

          ErrorHandler getErrorHandler()

      Back-ends processing work asynchronously should catch all eventual errors in the `ErrorHandler` to avoid losing information about the failing index updates.
      Returns:
        the configured `ErrorHandler`

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