org.hibernate.search.store.spi

## Interface LockFactoryCreator

- All Superinterfaces:
    Service
  All Known Implementing Classes:
    DefaultLockFactoryCreator

      public interface LockFactoryCreator
      extends Service

  A service for obtaining `LockFactory`s based on the current configuration.
  Author:
    Sanne Grinovero, Hardy Ferentschik, Gunnar Morling

- - ### Method Summary

    All Methods Instance Methods Abstract 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.

- - ### Method Detail

    - #### createLockFactory

          LockFactory createLockFactory(Path indexDir,
                                        Properties dirConfiguration)

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