public static class MassIndexingJob.ParametersBuilder extends Object
hibernate-search-mass-indexing.xml
.Modifier and Type | Method and Description |
---|---|
Properties |
build()
Build the parameters.
|
MassIndexingJob.ParametersBuilder |
cacheMode(CacheMode cacheMode)
The Hibernate
CacheMode when loading entities. |
MassIndexingJob.ParametersBuilder |
checkpointInterval(int checkpointInterval)
The number of entities to process before triggering the next checkpoint.
|
MassIndexingJob.ParametersBuilder |
entityFetchSize(int entityFetchSize)
Specifies the fetch size to be used when loading entities from
database.
|
MassIndexingJob.ParametersBuilder |
entityManagerFactoryNamespace(String namespace)
The string that allows to select how you want to reference the
EntityManagerFactory . |
MassIndexingJob.ParametersBuilder |
entityManagerFactoryReference(String reference)
The string that will identify the
EntityManagerFactory . |
MassIndexingJob.ParametersBuilder |
idFetchSize(int idFetchSize)
Specifies the fetch size to be used when loading primary keys at the
step-level.
|
MassIndexingJob.ParametersBuilder |
maxResultsPerEntity(int maxResultsPerEntity)
The maximum number of results to load per entity type.
|
MassIndexingJob.ParametersBuilder |
maxThreads(int maxThreads)
The maximum number of threads to use for processing the job.
|
MassIndexingJob.ParametersBuilder |
optimizeAfterPurge(boolean optimizeAfterPurge)
Specify whether the mass indexer should be optimized at the beginning of the job.
|
MassIndexingJob.ParametersBuilder |
optimizeOnFinish(boolean optimizeOnFinish)
Specify whether the mass indexer should be optimized at the end of the job.
|
MassIndexingJob.ParametersBuilder |
purgeAllOnStart(boolean purgeAllOnStart)
Specify whether the existing lucene index should be purged at the beginning of the job.
|
MassIndexingJob.ParametersBuilder |
restrictedBy(Criterion criterion)
Add criterion to construct a customized selection of mass-indexing under the criteria approach.
|
MassIndexingJob.ParametersBuilder |
restrictedBy(String hql)
Use HQL / JPQL to index entities of a target entity type.
|
MassIndexingJob.ParametersBuilder |
rowsPerPartition(int rowsPerPartition)
The maximum number of rows to process per partition.
|
MassIndexingJob.ParametersBuilder |
sessionClearInterval(int sessionClearInterval)
The number of entities to process before clearing the session.
|
MassIndexingJob.ParametersBuilder |
tenantId(String tenantId)
Define the tenant ID for the job execution.
|
public MassIndexingJob.ParametersBuilder entityManagerFactoryNamespace(String namespace)
EntityManagerFactory
.
Possible values are:
namespace
- the name of namespace to usepublic MassIndexingJob.ParametersBuilder entityManagerFactoryReference(String reference)
EntityManagerFactory
. This
method is required if there's more than one persistence unit.reference
- the name of referencepublic MassIndexingJob.ParametersBuilder cacheMode(CacheMode cacheMode)
CacheMode
when loading entities.
This is an optional parameter, its default value is
MassIndexingJobParameters.Defaults.CACHE_MODE
.
cacheMode
- the cache modepublic MassIndexingJob.ParametersBuilder sessionClearInterval(int sessionClearInterval)
checkpointInterval
.
This is an optional parameter, its default value is
MassIndexingJobParameters.Defaults.SESSION_CLEAR_INTERVAL_DEFAULT_RAW
,
or the value of checkpointInterval
if it is smaller.
sessionClearInterval
- the number of entities to process before clearing the session.public MassIndexingJob.ParametersBuilder checkpointInterval(int checkpointInterval)
rowsPerPartition
.
This is an optional parameter, its default value is
MassIndexingJobParameters.Defaults.CHECKPOINT_INTERVAL_DEFAULT_RAW
, or the value of
rowsPerPartition
if it is smaller.
checkpointInterval
- the number of entities to process before triggering the next checkpoint.public MassIndexingJob.ParametersBuilder idFetchSize(int idFetchSize)
Integer.MIN_VALUE
, otherwise it
will attempt to preload everything in memory.
This is an optional parameter, its default value is
MassIndexingJobParameters.Defaults.ID_FETCH_SIZE
.
idFetchSize
- the fetch size to be used when loading primary keyspublic MassIndexingJob.ParametersBuilder entityFetchSize(int entityFetchSize)
Integer.MIN_VALUE
, otherwise it
will attempt to preload everything in memory.
This is an optional parameter, its default value is the value of the session clear interval.
entityFetchSize
- the fetch size to be used when loading entitiespublic MassIndexingJob.ParametersBuilder maxResultsPerEntity(int maxResultsPerEntity)
maxResultsPerEntity
- the maximum number of results returned per entity type.public MassIndexingJob.ParametersBuilder maxThreads(int maxThreads)
This is an optional parameter, its default value is the number of partitions.
maxThreads
- the maximum number of threads.public MassIndexingJob.ParametersBuilder optimizeAfterPurge(boolean optimizeAfterPurge)
This is an optional parameter, its default value is
MassIndexingJobParameters.Defaults.OPTIMIZE_AFTER_PURGE
.
optimizeAfterPurge
- optimize after purge.public MassIndexingJob.ParametersBuilder optimizeOnFinish(boolean optimizeOnFinish)
This is an optional parameter, its default value is
MassIndexingJobParameters.Defaults.OPTIMIZE_ON_FINISH
.
optimizeOnFinish
- optimize on finish.public MassIndexingJob.ParametersBuilder purgeAllOnStart(boolean purgeAllOnStart)
This is an optional parameter, its default value is
MassIndexingJobParameters.Defaults.PURGE_ALL_ON_START
.
purgeAllOnStart
- purge all on start.public MassIndexingJob.ParametersBuilder restrictedBy(Criterion criterion)
criterion
- criterion.public MassIndexingJob.ParametersBuilder restrictedBy(String hql)
hql
- HQL / JPQL.public MassIndexingJob.ParametersBuilder rowsPerPartition(int rowsPerPartition)
checkpointInterval
.
This is an optional parameter, its default value is
MassIndexingJobParameters.Defaults.ROWS_PER_PARTITION
.
rowsPerPartition
- Rows per partition.public MassIndexingJob.ParametersBuilder tenantId(String tenantId)
tenantId
- Tenant ID. Null or empty value is not allowed.public Properties build()
SearchException
- if the serialization of some parameters fail.Copyright © 2006-2018 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.