org.hibernate.search.store.impl

## Class DefaultLockFactoryCreator

- java.lang.Object
- - org.hibernate.search.store.impl.DefaultLockFactoryCreator

- All Implemented Interfaces:
    Service, Startable, LockFactoryCreator

      public class DefaultLockFactoryCreator
      extends Object
      implements LockFactoryCreator, Startable

  The one and only `LockFactoryCreator`.
  Author:
    Sanne Grinovero, Hardy Ferentschik, Gunnar Morling

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultLockFactoryCreator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `LockFactory` | `createLockFactory(Path indexDir, Properties dirConfiguration)` Creates a `LockFactory` as selected in the configuration for the Directory provider.
    `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

    - #### DefaultLockFactoryCreator

          public DefaultLockFactoryCreator()

  - ### Method Detail

    - #### 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

    - #### createLockFactory

          public LockFactory createLockFactory(Path indexDir,
                                               Properties dirConfiguration)

      Description copied from interface: `LockFactoryCreator`
      Creates a `LockFactory` as selected in the configuration for the Directory provider. The "simple" and "native" strategies a `Path` to know where to store the file system based locks; other implementations may ignore this parameter.
      Specified by:
        `createLockFactory` in interface `LockFactoryCreator`
      Parameters:
        `indexDir` - the directory to use to store locks, if needed by implementation
        `dirConfiguration` - the configuration of current DirectoryProvider
      Returns:
        the lock factory as configured, or a factory adhering to the "simple" strategy in case of configuration errors or as a default.

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