public interface MassIndexer
Modifier and Type | Method and Description |
---|---|
MassIndexer |
batchSizeToLoadObjects(int batchSize)
Sets the batch size used to load the root entities.
|
MassIndexer |
cacheMode(CacheMode cacheMode)
Sets the cache interaction mode for the data loading tasks.
|
MassIndexer |
idFetchSize(int idFetchSize)
Specifies the fetch size to be used when loading primary keys
if objects to be indexed.
|
MassIndexer |
limitIndexedObjectsTo(long maximum)
EXPERIMENTAL method: will probably change
Will stop indexing after having indexed a set amount of objects.
|
MassIndexer |
optimizeAfterPurge(boolean optimize)
If index optimization should be run before starting,
after the purgeAll.
|
MassIndexer |
optimizeOnFinish(boolean optimize)
If index optimization has to be started at the end of the indexing process.
|
MassIndexer |
progressMonitor(org.hibernate.search.batchindexing.MassIndexerProgressMonitor monitor)
Override the default
MassIndexerProgressMonitor . |
MassIndexer |
purgeAllOnStart(boolean purgeAll)
If all entities should be removed from the index before starting
using purgeAll.
|
Future<?> |
start()
Starts the indexing process in background (asynchronous).
|
void |
startAndWait()
Starts the indexing process, and then block until it's finished.
|
MassIndexer |
threadsForSubsequentFetching(int numberOfThreads)
Deprecated.
Being ignored: this method will be removed.
|
MassIndexer |
threadsToLoadObjects(int numberOfThreads)
Set the number of threads to be used to load
the root entities.
|
MassIndexer |
transactionTimeout(int timeoutInSeconds)
Timeout of transactions for loading ids and entities to be re-indexed.
|
MassIndexer |
typesToIndexInParallel(int threadsToIndexObjects)
Sets the number of entity types to be indexed in parallel.
|
MassIndexer typesToIndexInParallel(int threadsToIndexObjects)
threadsToIndexObjects
- number of entity types to be indexed in parallelMassIndexer threadsToLoadObjects(int numberOfThreads)
numberOfThreads
- the number of threadsMassIndexer batchSizeToLoadObjects(int batchSize)
batchSize
- the batch size@Deprecated MassIndexer threadsForSubsequentFetching(int numberOfThreads)
numberOfThreads
- the number of threadsMassIndexer progressMonitor(org.hibernate.search.batchindexing.MassIndexerProgressMonitor monitor)
MassIndexerProgressMonitor
.monitor
- this instance will receive updates about the massindexing progress.MassIndexer cacheMode(CacheMode cacheMode)
cacheMode
- the cache interaction modeMassIndexer optimizeOnFinish(boolean optimize)
optimize
- true
to enable the index optimization at the end of the indexing processMassIndexer optimizeAfterPurge(boolean optimize)
optimize
- true
to enable the index optimization after purgeMassIndexer purgeAllOnStart(boolean purgeAll)
purgeAll
- if true
all entities will be removed from the index before starting the indexingMassIndexer limitIndexedObjectsTo(long maximum)
maximum
- the maximum number of objects to indexFuture<?> start()
void startAndWait() throws InterruptedException
InterruptedException
- if the current thread is interrupted
while waiting.MassIndexer idFetchSize(int idFetchSize)
Integer.MIN_VALUE
otherwise it will attempt to preload everything in memory.idFetchSize
- the fetch size to be used when loading primary keysMassIndexer transactionTimeout(int timeoutInSeconds)
Only supported in JTA-compatible environments.
timeoutInSeconds
- the transaction timeout in seconds; If no value is given, the global default timeout of
the JTA environment applies.this
for method chainingCopyright © 2017 JBoss by Red Hat. All rights reserved.