org.hibernate.search.engine.impl

## Class ImmutableSearchFactory

- java.lang.Object
- - org.hibernate.search.engine.impl.ImmutableSearchFactory

- All Implemented Interfaces:
    AutoCloseable, ExtendedSearchIntegrator, BuildContext, ExtendedSearchIntegratorWithShareableState, SearchFactoryState, SearchIntegrator, WorkerBuildContext

      public class ImmutableSearchFactory
      extends Object
      implements ExtendedSearchIntegratorWithShareableState, WorkerBuildContext

  This implementation is never directly exposed to the user, it is always wrapped into a `MutableSearchFactory`
  Author:
    Emmanuel Bernard

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ImmutableSearchFactory(SearchFactoryState state)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addClasses(Class<?>... classes)` Add the following classes to the SearchIntegrator.
    `QueryContextBuilder` | `buildQueryBuilder()`
    `void` | `close()` Shuts down all workers and releases all resources.
    `HSQuery` | `createHSQuery(Query luceneQuery, Class<?>... entityTypes)` Return an Hibernate Search query object.
    `HSQuery` | `createHSQuery(Query luceneQuery, IndexedTypeMap<CustomTypeMetadata> types)` Return an Hibernate Search query object.
    `OperationDispatcher` | `createRemoteOperationDispatcher(Predicate<IndexManager> predicate)`
    `boolean` | `enlistWorkerInTransaction()`
    `IndexManagerHolder` | `getAllIndexesManager()`
    `Analyzer` | `getAnalyzer(IndexedTypeIdentifier type)` Retrieves the scoped analyzer for a given indexed type.
    `Analyzer` | `getAnalyzer(String name)` Retrieve an analyzer instance by its definition name
    `ScopedAnalyzerReference` | `getAnalyzerReference(IndexedTypeIdentifier type)` Retrieve the scoped analyzer reference for a given indexed type.
    `int` | `getCacheBitResultsSize()`
    `Properties` | `getConfigurationProperties()`
    `TypeHierarchy` | `getConfiguredTypeHierarchy()`
    `IndexedTypeSet` | `getConfiguredTypesPolymorphic(IndexedTypeSet types)` Given a set of target entities, return the set of configured subtypes.
    `DatabaseRetrievalMethod` | `getDefaultDatabaseRetrievalMethod()` Returns the default `DatabaseRetrievalMethod`.
    `ObjectLookupMethod` | `getDefaultObjectLookupMethod()` Returns the default `ObjectLookupMethod`.
    `TimeoutExceptionFactory` | `getDefaultTimeoutExceptionFactory()` Useful if you need to create custom exception types to represent query timeouts.
    `DocumentBuilderContainedEntity` | `getDocumentBuilderContainedEntity(IndexedTypeIdentifier entityType)`
    `IndexedTypeMap<DocumentBuilderContainedEntity>` | `getDocumentBuildersContainedEntities()`
    `ErrorHandler` | `getErrorHandler()` Used to catch exceptions in all synchronous operations; but default they are logged, the user can configure alternative error management means.
    `int` | `getFilterCacheBitResultsSize()`
    `FilterCachingStrategy` | `getFilterCachingStrategy()`
    `FilterDef` | `getFilterDefinition(String name)`
    `Map<String,FilterDef>` | `getFilterDefinitions()`
    `EntityIndexBinding` | `getIndexBinding(IndexedTypeIdentifier entityType)` Returns the entity to index binding for the given type.
    `IndexedTypeMap<EntityIndexBinding>` | `getIndexBindings()` Returns a map of all known entity index binding (indexed entities) keyed against the indexed type
    `IndexedTypeDescriptor` | `getIndexedTypeDescriptor(IndexedTypeIdentifier type)` Returns a descriptor for the specified entity type describing its indexed state.
    `TypeHierarchy` | `getIndexedTypeHierarchy()`
    `IndexedTypeSet` | `getIndexedTypeIdentifiers()` Returns the set of currently indexed types.
    `IndexedTypeSet` | `getIndexedTypesPolymorphic(IndexedTypeSet types)` Given a set of target entities, return the set of configured subtypes that are indexed.
    `IndexingMode` | `getIndexingMode()`
    `IndexManager` | `getIndexManager(String indexName)` Get an `IndexManager` using the name
    `IndexManagerFactory` | `getIndexManagerFactory()`
    `IndexManagerHolder` | `getIndexManagerHolder()`
    `IndexReaderAccessor` | `getIndexReaderAccessor()` Provides access to the IndexReader API
    `InstanceInitializer` | `getInstanceInitializer()`
    `SearchIntegration` | `getIntegration(IndexManagerType indexManagerType)` Retrieve the integration information for a given index manager type.
    `Map<IndexManagerType,SearchIntegration>` | `getIntegrations()` Returns a map of all known integrations keyed against the indexed manager type
    `SearchMapping` | `getProgrammaticMapping()`
    `EntityIndexBinding` | `getSafeIndexBindingForEntity(Class<?> entityType)` Deprecated.
    `EntityIndexBinding` | `getSafeIndexBindingForEntity(IndexedTypeIdentifier type)`
    `ServiceManager` | `getServiceManager()` Returns the service manager.
    `Statistics` | `getStatistics()` Retrieve the statistics instance for this factory.
    `StatisticsImplementor` | `getStatisticsImplementor()` Retrieve the statistics implementor instance for this factory.
    `TimingSource` | `getTimingSource()`
    `ExtendedSearchIntegrator` | `getUninitializedSearchIntegrator()` Returns the `ExtendedSearchIntegrator` instance.
    `Worker` | `getWorker()` The Worker is the entry point to apply writes and updates to the indexes.
    `LuceneWorkSerializer` | `getWorkSerializer()`
    `LuceneWorkSerializer` | `getWorkSerializerState()`
    `boolean` | `isDeleteByTermEnforced()`
    `boolean` | `isDirtyChecksEnabled()`
    `boolean` | `isIdProvidedImplicit()`
    `boolean` | `isIndexMetadataComplete()`
    `boolean` | `isIndexUninvertingAllowed()`
    `boolean` | `isJMXEnabled()`
    `boolean` | `isMultitenancyEnabled()`
    `boolean` | `isStopped()`
    `boolean` | `isTransactionManagerExpected()`
    `BatchBackend` | `makeBatchBackend(MassIndexerProgressMonitor progressMonitor)`
    `void` | `optimize()` Optimize all indexes
    `void` | `optimize(IndexedTypeIdentifier entityType)` Optimize the index holding `entityType`
    `<T> T` | `unwrap(Class<T> cls)` Unwraps some internal Hibernate Search types.

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

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

- - ### Constructor Detail

    - #### ImmutableSearchFactory

          public ImmutableSearchFactory(SearchFactoryState state)

  - ### Method Detail

    - #### getFilterDefinitions

          public Map<String,FilterDef> getFilterDefinitions()

      Specified by:
        `getFilterDefinitions` in interface `SearchFactoryState`

    - #### getIndexingMode

          public IndexingMode getIndexingMode()

      Specified by:
        `getIndexingMode` in interface `BuildContext`
      Specified by:
        `getIndexingMode` in interface `SearchFactoryState`
      Specified by:
        `getIndexingMode` in interface `SearchIntegrator`
      Returns:
        the current indexing strategy as specified via `Environment.INDEXING_STRATEGY`.

    - #### close

          public void close()

      Description copied from interface: `SearchIntegrator`
      Shuts down all workers and releases all resources.
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `SearchIntegrator`

    - #### createHSQuery

          public HSQuery createHSQuery(Query luceneQuery,
                                       Class<?>... entityTypes)

      Description copied from interface: `SearchIntegrator`
      Return an Hibernate Search query object.

      This method DOES support non-Lucene backends (e.g. Elasticsearch).

      The returned object uses fluent APIs to define additional query settings.

      Be aware that some backends may not implement `HSQuery.luceneQuery(Query)`, in which case the query provided here cannot be overridden.

      Specified by:
        `createHSQuery` in interface `SearchIntegrator`
      Parameters:
        `luceneQuery` - the full-text engine query
        `entityTypes` - the targeted entity types
      Returns:
        an Hibernate Search query object

    - #### createHSQuery

          public HSQuery createHSQuery(Query luceneQuery,
                                       IndexedTypeMap<CustomTypeMetadata> types)

      Description copied from interface: `SearchIntegrator`
      Return an Hibernate Search query object.

      This method DOES support non-Lucene backends (e.g. Elasticsearch).

      The returned object uses fluent APIs to define additional query settings.

      Be aware that some backends may not implement `HSQuery.luceneQuery(Query)`, in which case the query provided here cannot be overridden.

      Specified by:
        `createHSQuery` in interface `SearchIntegrator`
      Parameters:
        `luceneQuery` - the full-text engine query
        `types` - the targeted entity types, mapped to (potentially null) overridden metadata
      Returns:
        an Hibernate Search query object

    - #### getDocumentBuildersContainedEntities

          public IndexedTypeMap<DocumentBuilderContainedEntity> getDocumentBuildersContainedEntities()

      Specified by:
        `getDocumentBuildersContainedEntities` in interface `SearchFactoryState`

    - #### getIndexBindings

          public IndexedTypeMap<EntityIndexBinding> getIndexBindings()

      Description copied from interface: `SearchIntegrator`
      Returns a map of all known entity index binding (indexed entities) keyed against the indexed type
      Specified by:
        `getIndexBindings` in interface `SearchFactoryState`
      Specified by:
        `getIndexBindings` in interface `SearchIntegrator`
      Returns:
        a map of all known entity index binding (indexed entities) keyed against the indexed type. The empty map is returned if there are no indexed types.

    - #### getIndexBinding

          public EntityIndexBinding getIndexBinding(IndexedTypeIdentifier entityType)

      Description copied from interface: `SearchIntegrator`
      Returns the entity to index binding for the given type.
      Specified by:
        `getIndexBinding` in interface `SearchIntegrator`
      Parameters:
        `entityType` - the type for which to retrieve the binding
      Returns:
        the entity to index binding for the given type. `null` is returned for types which are unindexed or unknown.

    - #### getDocumentBuilderContainedEntity

          public DocumentBuilderContainedEntity getDocumentBuilderContainedEntity(IndexedTypeIdentifier entityType)

      Specified by:
        `getDocumentBuilderContainedEntity` in interface `ExtendedSearchIntegrator`

    - #### addClasses

          public void addClasses(Class<?>... classes)

      Description copied from interface: `SearchIntegrator`
      Add the following classes to the SearchIntegrator. If these classes are new to the SearchIntegrator this will trigger a reconfiguration.
      Specified by:
        `addClasses` in interface `SearchIntegrator`
      Parameters:
        `classes` - the classes to add to the `SearchIntegrator`

    - #### getWorker

          public Worker getWorker()

      Description copied from interface: `SearchIntegrator`
      The Worker is the entry point to apply writes and updates to the indexes.
      Specified by:
        `getWorker` in interface `SearchFactoryState`
      Specified by:
        `getWorker` in interface `SearchIntegrator`
      Returns:
        the `Worker`

    - #### optimize

          public void optimize()

      Description copied from interface: `SearchIntegrator`
      Optimize all indexes
      Specified by:
        `optimize` in interface `SearchIntegrator`

    - #### optimize

          public void optimize(IndexedTypeIdentifier entityType)

      Description copied from interface: `SearchIntegrator`
      Optimize the index holding `entityType`
      Specified by:
        `optimize` in interface `SearchIntegrator`
      Parameters:
        `entityType` - the entity type (index) to optimize

    - #### getAnalyzer

          public Analyzer getAnalyzer(String name)

      Description copied from interface: `SearchIntegrator`
      Retrieve an analyzer instance by its definition name
      Specified by:
        `getAnalyzer` in interface `SearchIntegrator`
      Parameters:
        `name` - the name of the analyzer
      Returns:
        analyzer with the specified name

    - #### getIntegration

          public SearchIntegration getIntegration(IndexManagerType indexManagerType)

      Description copied from interface: `ExtendedSearchIntegrator`
      Retrieve the integration information for a given index manager type.
      Specified by:
        `getIntegration` in interface `ExtendedSearchIntegrator`
      Parameters:
        `indexManagerType` - the index manager type for which to retrieve the integration
      Returns:
        The corresponding integration

    - #### getAnalyzer

          public Analyzer getAnalyzer(IndexedTypeIdentifier type)

      Description copied from interface: `SearchIntegrator`
      Retrieves the scoped analyzer for a given indexed type.
      Specified by:
        `getAnalyzer` in interface `SearchIntegrator`
      Parameters:
        `type` - The indexed type identifier for which to retrieve the analyzer.
      Returns:
        The scoped analyzer for the specified class.

    - #### getAnalyzerReference

          public ScopedAnalyzerReference getAnalyzerReference(IndexedTypeIdentifier type)

      Description copied from interface: `ExtendedSearchIntegrator`
      Retrieve the scoped analyzer reference for a given indexed type.
      Specified by:
        `getAnalyzerReference` in interface `ExtendedSearchIntegrator`
      Parameters:
        `type` - The type for which to retrieve the analyzer.
      Returns:
        The scoped analyzer for the specified class.

    - #### buildQueryBuilder

          public QueryContextBuilder buildQueryBuilder()

      Specified by:
        `buildQueryBuilder` in interface `SearchIntegrator`
      Returns:
        return a query builder providing a fluent API to create Lucene queries

    - #### getStatistics

          public Statistics getStatistics()

      Description copied from interface: `SearchIntegrator`
      Retrieve the statistics instance for this factory.
      Specified by:
        `getStatistics` in interface `SearchFactoryState`
      Specified by:
        `getStatistics` in interface `SearchIntegrator`
      Returns:
        The statistics.

    - #### getStatisticsImplementor

          public StatisticsImplementor getStatisticsImplementor()

      Description copied from interface: `ExtendedSearchIntegrator`
      Retrieve the statistics implementor instance for this factory.
      Specified by:
        `getStatisticsImplementor` in interface `ExtendedSearchIntegrator`
      Returns:
        The statistics implementor.

    - #### getFilterCachingStrategy

          public FilterCachingStrategy getFilterCachingStrategy()

      Specified by:
        `getFilterCachingStrategy` in interface `ExtendedSearchIntegrator`
      Specified by:
        `getFilterCachingStrategy` in interface `SearchFactoryState`

    - #### getIntegrations

          public Map<IndexManagerType,SearchIntegration> getIntegrations()

      Description copied from interface: `ExtendedSearchIntegrator`
      Returns a map of all known integrations keyed against the indexed manager type
      Specified by:
        `getIntegrations` in interface `ExtendedSearchIntegrator`
      Specified by:
        `getIntegrations` in interface `SearchFactoryState`
      Returns:
        a map of all integrations keyed against the indexed manager type. The empty map is returned if there are no indexed types (hence no integrations).

    - #### getCacheBitResultsSize

          public int getCacheBitResultsSize()

      Specified by:
        `getCacheBitResultsSize` in interface `SearchFactoryState`

    - #### getConfigurationProperties

          public Properties getConfigurationProperties()

      Specified by:
        `getConfigurationProperties` in interface `ExtendedSearchIntegrator`
      Specified by:
        `getConfigurationProperties` in interface `SearchFactoryState`
      Returns:
        the configuration properties for this factory

    - #### getFilterDefinition

          public FilterDef getFilterDefinition(String name)

      Specified by:
        `getFilterDefinition` in interface `ExtendedSearchIntegrator`

    - #### getFilterCacheBitResultsSize

          public int getFilterCacheBitResultsSize()

      Specified by:
        `getFilterCacheBitResultsSize` in interface `ExtendedSearchIntegrator`

    - #### getConfiguredTypesPolymorphic

          public IndexedTypeSet getConfiguredTypesPolymorphic(IndexedTypeSet types)

      Description copied from interface: `ExtendedSearchIntegrator`
      Given a set of target entities, return the set of configured subtypes.

      "Configured" types are types that Hibernate Search was instructed to take into consideration, i.e. types returned by `SearchConfiguration.getClassMappings()`.

      Specified by:
        `getConfiguredTypesPolymorphic` in interface `ExtendedSearchIntegrator`
      Returns:
        the set of configured subtypes

    - #### getIndexedTypesPolymorphic

          public IndexedTypeSet getIndexedTypesPolymorphic(IndexedTypeSet types)

      Description copied from interface: `ExtendedSearchIntegrator`
      Given a set of target entities, return the set of configured subtypes that are indexed.

      "Configured" types are types that Hibernate Search was instructed to take into consideration, i.e. types returned by `SearchConfiguration.getClassMappings()`.

      "Indexed" types are configured types that happened to be annotated with `@Indexed`, or similarly configured through a programmatic mapping.

      Note: the fact that a given type is configured or indexed doesn't mean that its subtypes are, too. Each type must be configured explicitly.

      Specified by:
        `getIndexedTypesPolymorphic` in interface `ExtendedSearchIntegrator`
      Parameters:
        `types` - the target set
      Returns:
        the set of configured subtypes that are indexed

    - #### makeBatchBackend

          public BatchBackend makeBatchBackend(MassIndexerProgressMonitor progressMonitor)

      Specified by:
        `makeBatchBackend` in interface `SearchIntegrator`

    - #### getConfiguredTypeHierarchy

          public TypeHierarchy getConfiguredTypeHierarchy()

      Specified by:
        `getConfiguredTypeHierarchy` in interface `SearchFactoryState`
      Returns:
        The type hierarchy for all configured types, indexed or not.

    - #### getIndexedTypeHierarchy

          public TypeHierarchy getIndexedTypeHierarchy()

      Specified by:
        `getIndexedTypeHierarchy` in interface `SearchFactoryState`
      Returns:
        The type hierarchy for configured types that are indexed (for instance because they are annotated with @Indexed)

    - #### getServiceManager

          public ServiceManager getServiceManager()

      Description copied from interface: `SearchIntegrator`
      Returns the service manager.
      Specified by:
        `getServiceManager` in interface `BuildContext`
      Specified by:
        `getServiceManager` in interface `SearchFactoryState`
      Specified by:
        `getServiceManager` in interface `SearchIntegrator`
      Returns:
        Returns the service manager.

    - #### getDefaultDatabaseRetrievalMethod

          public DatabaseRetrievalMethod getDefaultDatabaseRetrievalMethod()

      Description copied from interface: `ExtendedSearchIntegrator`
      Returns the default `DatabaseRetrievalMethod`. This is either the system default or the default specified via the configuration property `Environment.DATABASE_RETRIEVAL_METHOD`.
      Specified by:
        `getDefaultDatabaseRetrievalMethod` in interface `ExtendedSearchIntegrator`
      Returns:
        returns the default `DatabaseRetrievalMethod`.

    - #### getDefaultObjectLookupMethod

          public ObjectLookupMethod getDefaultObjectLookupMethod()

      Description copied from interface: `ExtendedSearchIntegrator`
      Returns the default `ObjectLookupMethod`. This is either the system default or the default specified via the configuration property `Environment.OBJECT_LOOKUP_METHOD`.
      Specified by:
        `getDefaultObjectLookupMethod` in interface `ExtendedSearchIntegrator`
      Returns:
        returns the default `OBJECT_LOOKUP_METHOD`.

    - #### getUninitializedSearchIntegrator

          public ExtendedSearchIntegrator getUninitializedSearchIntegrator()

      Description copied from interface: `BuildContext`
      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.
      Specified by:
        `getUninitializedSearchIntegrator` in interface `BuildContext`
      Returns:
        the `ExtendedSearchIntegrator` instance

    - #### isJMXEnabled

          public boolean isJMXEnabled()

      Specified by:
        `isJMXEnabled` in interface `ExtendedSearchIntegrator`
      Returns:
        `true` if JMX is enabled

    - #### isDirtyChecksEnabled

          public boolean isDirtyChecksEnabled()

      Specified by:
        `isDirtyChecksEnabled` in interface `ExtendedSearchIntegrator`
      Returns:
        `true` if we are allowed to inspect entity state to skip some indexing operations. Can be disabled to get pre-3.4 behavior which always rebuilds the document.

    - #### isStopped

          public boolean isStopped()

      Specified by:
        `isStopped` in interface `SearchIntegrator`
      Returns:
        true if the SearchIntegrator was stopped

    - #### isTransactionManagerExpected

          public boolean isTransactionManagerExpected()

      Specified by:
        `isTransactionManagerExpected` in interface `SearchFactoryState`
      Specified by:
        `isTransactionManagerExpected` in interface `WorkerBuildContext`
      Returns:
        `true` if a transaction manager is expected, `false` otherwise.
      See Also:
        `SearchConfiguration.isTransactionManagerExpected()`

    - #### getAllIndexesManager

          public IndexManagerHolder getAllIndexesManager()

      Specified by:
        `getAllIndexesManager` in interface `BuildContext`
      Specified by:
        `getAllIndexesManager` in interface `SearchFactoryState`
      Returns:
        a reference to the `IndexManagerHolder`, storing all `IndexManager` instances.

    - #### getIndexManagerHolder

          public IndexManagerHolder getIndexManagerHolder()

      Specified by:
        `getIndexManagerHolder` in interface `ExtendedSearchIntegrator`
      Returns:
        Returns the `IndexManagerHolder` which gives access to all index managers known to this factory

    - #### getSafeIndexBindingForEntity

          @Deprecated
          public EntityIndexBinding getSafeIndexBindingForEntity(Class<?> entityType)

      Deprecated.

    - #### getSafeIndexBindingForEntity

          public EntityIndexBinding getSafeIndexBindingForEntity(IndexedTypeIdentifier type)

    - #### getErrorHandler

          public ErrorHandler getErrorHandler()

      Description copied from interface: `SearchIntegrator`
      Used to catch exceptions in all synchronous operations; but default they are logged, the user can configure alternative error management means.
      Specified by:
        `getErrorHandler` in interface `BuildContext`
      Specified by:
        `getErrorHandler` in interface `SearchFactoryState`
      Specified by:
        `getErrorHandler` in interface `SearchIntegrator`
      Returns:
        the configured ErrorHandler, global to the SearchIntegrator

    - #### getIndexReaderAccessor

          public IndexReaderAccessor getIndexReaderAccessor()

      Description copied from interface: `SearchIntegrator`
      Provides access to the IndexReader API
      Specified by:
        `getIndexReaderAccessor` in interface `SearchIntegrator`
      Returns:
        the IndexReaderAccessor for this SearchIntegrator

    - #### getIndexedTypeDescriptor

          public IndexedTypeDescriptor getIndexedTypeDescriptor(IndexedTypeIdentifier type)

      Description copied from interface: `SearchIntegrator`
      Returns a descriptor for the specified entity type describing its indexed state.
      Specified by:
        `getIndexedTypeDescriptor` in interface `SearchIntegrator`
      Parameters:
        `type` - the identification of the indexed entity for which to retrieve the descriptor
      Returns:
        a non `null` `IndexedEntityDescriptor`. This method can also be called for non indexed types. To determine whether the entity is actually indexed `IndexedTypeDescriptor.isIndexed()` can be used.

    - #### getIndexedTypeIdentifiers

          public IndexedTypeSet getIndexedTypeIdentifiers()

      Description copied from interface: `SearchIntegrator`
      Returns the set of currently indexed types.
      Specified by:
        `getIndexedTypeIdentifiers` in interface `SearchIntegrator`
      Returns:
        the set of currently indexed types. This might be empty.

    - #### getInstanceInitializer

          public InstanceInitializer getInstanceInitializer()

      Specified by:
        `getInstanceInitializer` in interface `ExtendedSearchIntegrator`
      Specified by:
        `getInstanceInitializer` in interface `SearchFactoryState`
      Specified by:
        `getInstanceInitializer` in interface `WorkerBuildContext`
      Returns:
        an instance of `InstanceInitializer` for class/object initialization.

    - #### getDefaultTimeoutExceptionFactory

          public TimeoutExceptionFactory getDefaultTimeoutExceptionFactory()

      Description copied from interface: `SearchIntegrator`
      Useful if you need to create custom exception types to represent query timeouts.
      Specified by:
        `getDefaultTimeoutExceptionFactory` in interface `SearchFactoryState`
      Specified by:
        `getDefaultTimeoutExceptionFactory` in interface `SearchIntegrator`
      Returns:
        the configured TimeoutExceptionFactory

    - #### getTimingSource

          public TimingSource getTimingSource()

      Specified by:
        `getTimingSource` in interface `ExtendedSearchIntegrator`
      Specified by:
        `getTimingSource` in interface `SearchFactoryState`
      Returns:
        the globally configured TimingSource, which we use to implement timeouts during query execution.

    - #### getProgrammaticMapping

          public SearchMapping getProgrammaticMapping()

      Specified by:
        `getProgrammaticMapping` in interface `SearchFactoryState`

    - #### isIndexMetadataComplete

          public boolean isIndexMetadataComplete()

      Specified by:
        `isIndexMetadataComplete` in interface `SearchFactoryState`
      Specified by:
        `isIndexMetadataComplete` in interface `WorkerBuildContext`
      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

          public boolean isDeleteByTermEnforced()

      Specified by:
        `isDeleteByTermEnforced` in interface `SearchFactoryState`
      Specified by:
        `isDeleteByTermEnforced` in interface `WorkerBuildContext`
      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

    - #### isIdProvidedImplicit

          public boolean isIdProvidedImplicit()

      Specified by:
        `isIdProvidedImplicit` in interface `SearchFactoryState`

    - #### isMultitenancyEnabled

          public boolean isMultitenancyEnabled()

      Specified by:
        `isMultitenancyEnabled` in interface `SearchFactoryState`
      Specified by:
        `isMultitenancyEnabled` in interface `WorkerBuildContext`
      Returns:
        `true` if `multitenancy` should be enabled. When in doubt, this should return `true`.

    - #### getIndexManagerFactory

          public IndexManagerFactory getIndexManagerFactory()

      Specified by:
        `getIndexManagerFactory` in interface `SearchFactoryState`

    - #### enlistWorkerInTransaction

          public boolean enlistWorkerInTransaction()

      Specified by:
        `enlistWorkerInTransaction` in interface `SearchFactoryState`
      Specified by:
        `enlistWorkerInTransaction` in interface `WorkerBuildContext`
      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.

    - #### getIndexManager

          public IndexManager getIndexManager(String indexName)

      Description copied from interface: `SearchIntegrator`
      Get an `IndexManager` using the name
      Specified by:
        `getIndexManager` in interface `SearchIntegrator`
      Parameters:
        `indexName` - the name of the `IndexManager`
      Returns:
        the selected `IndexManager`

    - #### isIndexUninvertingAllowed

          public boolean isIndexUninvertingAllowed()

      Specified by:
        `isIndexUninvertingAllowed` in interface `ExtendedSearchIntegrator`
      Returns:
        whether index uninverting should be done when running queries with sorts not covered by the configured sortable fields. If not allowed, an exception will be raised in this situation.

    - #### unwrap

          public <T> T unwrap(Class<T> cls)

      Description copied from interface: `SearchIntegrator`
      Unwraps some internal Hibernate Search types. Currently, no public type is accessible. This method should not be used by users.
      Specified by:
        `unwrap` in interface `SearchIntegrator`
      Type Parameters:
        `T` - the type of the unwrapped object
      Parameters:
        `cls` - the class of the internal object to unwrap
      Returns:
        the unwrapped object

    - #### getWorkSerializer

          public LuceneWorkSerializer getWorkSerializer()

      Specified by:
        `getWorkSerializer` in interface `SearchIntegrator`

    - #### getWorkSerializerState

          public LuceneWorkSerializer getWorkSerializerState()

      Specified by:
        `getWorkSerializerState` in interface `SearchFactoryState`

    - #### createRemoteOperationDispatcher

          public OperationDispatcher createRemoteOperationDispatcher(Predicate<IndexManager> predicate)

      Specified by:
        `createRemoteOperationDispatcher` in interface `SearchIntegrator`
      Parameters:
        `predicate` - A predicate allowing to exclude index managers from dispatching. Works will not be applied to these index managers.
      Returns:
        An operation dispatcher allowing to insert works retrieved from remote sources (e.g. JMS or JGroups slaves), but only for index managers verifying the given predicate. This allows JMS or JGroups integrations to perform checks on index managers that wouldn't exist before the dispatch, in the case of dynamic sharding in particular.

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