org.hibernate.search.engine.impl

## Class DefaultIndexManagerFactory

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

- All Implemented Interfaces:
    IndexManagerFactory, Service, Startable

      public class DefaultIndexManagerFactory
      extends Object
      implements IndexManagerFactory, Startable

  This is the default `IndexManagerFactory` implementation for Hibernate Search.
  Author:
    Sanne Grinovero (C) 2012 Red Hat Inc., Hardy Ferentschik

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultIndexManagerFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected String` | `aliasToFQN(String alias)` Provide a way to expand known aliases to fully qualified class names.
    `IndexManager` | `createDefaultIndexManager()`
    `IndexManager` | `createIndexManagerByName(String indexManagerImplementationName)`
    `protected IndexManager` | `fromAlias(String alias)` Extension point: allow to override aliases or add new ones to directly create class instances.
    `void` | `start(Properties properties, BuildContext context)` Start phase notification.

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

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

- - ### Constructor Detail

    - #### DefaultIndexManagerFactory

          public DefaultIndexManagerFactory()

  - ### Method Detail

    - #### createDefaultIndexManager

          public IndexManager createDefaultIndexManager()

      Specified by:
        `createDefaultIndexManager` in interface `IndexManagerFactory`
      Returns:
        a new instance of the default IndexManager

    - #### createIndexManagerByName

          public IndexManager createIndexManagerByName(String indexManagerImplementationName)

      Specified by:
        `createIndexManagerByName` in interface `IndexManagerFactory`
      Parameters:
        `indexManagerImplementationName` - how this is resolved to an IndexManager type is left to the implementor.
      Returns:
        a new IndexManager instance of the chosen type

    - #### start

          public void start(Properties properties,
                            BuildContext context)

      Description copied from interface: `Startable`
      Start phase notification.
      Specified by:
        `start` in interface `Startable`
      Parameters:
        `properties` - the configuration properties
        `context` - the current context instance

    - #### aliasToFQN

          protected String aliasToFQN(String alias)

      Provide a way to expand known aliases to fully qualified class names. As opposed to `fromAlias(String)` we can use this to expand to well known implementations which are optional on the classpath.
      Parameters:
        `alias` - the alias to replace with the fully qualified class name of the implementation
      Returns:
        the same name, or a fully qualified class name to use instead

    - #### fromAlias

          protected IndexManager fromAlias(String alias)

      Extension point: allow to override aliases or add new ones to directly create class instances.
      Parameters:
        `alias` - the requested alias
      Returns:
        return the index manager for the given alias or `null` if the alias is unknown.

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