public class PropertiesParseHelper extends Object
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. |
public static boolean isExclusiveIndexUsageEnabled(Properties indexProps)
isExclusiveIndexUsageEnabled.
indexProps
- a Properties
object.true
when a lock on the index will not be released until the
SearchIntegrator (or SessionFactory) is closed. Default to false
public static boolean isIndexMetadataComplete(Properties indexProps, WorkerBuildContext context)
Environment.INDEX_METADATA_COMPLETE
for this specific index.
If no value is set, the default is defined by SearchConfiguration.isIndexMetadataComplete()
.indexProps
- The index configuration propertiescontext
- The WorkerBuildContext provides a view of the default settingtrue
when the index metadata is fully defined.public static int extractMaxQueueSize(String indexName, Properties indexProps)
indexName
- the index name (used for logging)indexProps
- MaskedProperties for this IndexManagerpublic static OptimizerStrategy getOptimizerStrategy(IndexManager callback, Properties indexProperties, WorkerBuildContext buildContext)
public static LuceneIndexingParameters extractIndexingPerformanceOptions(Properties properties)
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.
properties
- The properties extracted from the configuration.LuceneIndexingParameters
instancepublic static DirectoryBasedReaderProvider createDirectoryBasedReaderProvider(DirectoryBasedIndexManager indexManager, Properties properties, WorkerBuildContext buildContext)
public static Integer extractFlushInterval(String indexName, Properties indexProps)
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved