org.hibernate.search.indexes.impl

## Class PropertiesParseHelper

- java.lang.Object
- - org.hibernate.search.indexes.impl.PropertiesParseHelper

-     public class PropertiesParseHelper
      extends Object

  Contains helper to parse properties which should be read by the majority of IndexManager implementations.
  Author:
    Sanne Grinovero (C) 2011 Red Hat Inc.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DirectoryBasedReaderProvider` | `createDirectoryBasedReaderProvider(DirectoryBasedIndexManager indexManager, Properties properties, WorkerBuildContext buildContext)`
    `static Integer` | `extractFlushInterval(String indexName, Properties indexProps)`
    `static LuceneIndexingParameters` | `extractIndexingPerformanceOptions(Properties properties)` Creates a new `LuceneIndexingParameters` instance for the specified provider.
    `static int` | `extractMaxQueueSize(String indexName, Properties indexProps)`
    `static OptimizerStrategy` | `getOptimizerStrategy(IndexManager callback, Properties indexProperties, WorkerBuildContext buildContext)`
    `static boolean` | `isExclusiveIndexUsageEnabled(Properties indexProps)` isExclusiveIndexUsageEnabled.
    `static boolean` | `isIndexMetadataComplete(Properties indexProps, WorkerBuildContext context)` Returns the configured value of `Environment.INDEX_METADATA_COMPLETE` for this specific index.

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

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

- - ### Method Detail

    - #### isExclusiveIndexUsageEnabled

          public static boolean isExclusiveIndexUsageEnabled(Properties indexProps)

      isExclusiveIndexUsageEnabled.

      Parameters:
        `indexProps` - a `Properties` object.
      Returns:
        `true` when a lock on the index will not be released until the SearchIntegrator (or SessionFactory) is closed. Default to `false`

    - #### isIndexMetadataComplete

          public static boolean isIndexMetadataComplete(Properties indexProps,
                                                        WorkerBuildContext context)

      Returns the configured value of `Environment.INDEX_METADATA_COMPLETE` for this specific index. If no value is set, the default is defined by `SearchConfiguration.isIndexMetadataComplete()`.
      Parameters:
        `indexProps` - The index configuration properties
        `context` - The WorkerBuildContext provides a view of the default setting
      Returns:
        `true` when the index metadata is fully defined.

    - #### extractMaxQueueSize

          public static int extractMaxQueueSize(String indexName,
                                                Properties indexProps)

      Parameters:
        `indexName` - the index name (used for logging)
        `indexProps` - MaskedProperties for this IndexManager
      Returns:
        the maximum queue length to be used on the backends of this index

    - #### getOptimizerStrategy

          public static OptimizerStrategy getOptimizerStrategy(IndexManager callback,
                                                               Properties indexProperties,
                                                               WorkerBuildContext buildContext)

    - #### extractIndexingPerformanceOptions

          public static LuceneIndexingParameters extractIndexingPerformanceOptions(Properties properties)

      Creates a new `LuceneIndexingParameters` instance for the specified provider. If there are no matching properties in the configuration default values will be applied.

      NOTE:
      If a non batch value is set in the configuration apply it also to the batch mode. This covers the case where users only specify parameters for the non batch mode. In this case the same parameters apply for batch indexing. Parameters are found "depth-first": if a batch parameter is set in a global scope it will take priority on local transaction parameters.

      Parameters:
        `properties` - The properties extracted from the configuration.
      Returns:
        a new `LuceneIndexingParameters` instance

    - #### createDirectoryBasedReaderProvider

          public static DirectoryBasedReaderProvider createDirectoryBasedReaderProvider(DirectoryBasedIndexManager indexManager,
                                                                                        Properties properties,
                                                                                        WorkerBuildContext buildContext)

    - #### extractFlushInterval

          public static Integer extractFlushInterval(String indexName,
                                                     Properties indexProps)

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