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 |
failureHandler(MassIndexingFailureHandler failureHandler)
Set the
MassIndexingFailureHandler. |
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 |
mergeSegmentsAfterPurge(boolean enable)
Merge each index into a single segment after the initial index purge, just before indexing.
|
MassIndexer |
mergeSegmentsOnFinish(boolean enable)
Merge each index into a single segment after indexing.
|
MassIndexer |
monitor(MassIndexingMonitor monitor)
Set the
MassIndexingMonitor. |
MassIndexer |
purgeAllOnStart(boolean purgeAll)
If all entities should be removed from the index before starting
using purgeAll.
|
CompletableFuture<?> |
start()
Starts the indexing process in background (asynchronous).
|
void |
startAndWait()
Starts the indexing process, and then block until it's finished.
|
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 parallelthis for method chainingMassIndexer threadsToLoadObjects(int numberOfThreads)
numberOfThreads - the number of threadsthis for method chainingMassIndexer batchSizeToLoadObjects(int batchSize)
batchSize - the batch sizethis for method chainingMassIndexer cacheMode(CacheMode cacheMode)
CacheMode.IGNORE.cacheMode - the cache interaction modethis for method chainingMassIndexer mergeSegmentsOnFinish(boolean enable)
false.enable - true to enable this operation, false to disable it.this for method chainingMassIndexer mergeSegmentsAfterPurge(boolean enable)
true.
This setting has no effect if purgeAllOnStart is set to false.
enable - true to enable this operation, false to disable it.this for method chainingMassIndexer purgeAllOnStart(boolean purgeAll)
purgeAll - if true all entities will be removed from the index before starting the indexingthis for method chainingMassIndexer limitIndexedObjectsTo(long maximum)
maximum - the maximum number of objects to indexthis for method chainingCompletableFuture<?> 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 keysthis for method chainingMassIndexer 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 chainingMassIndexer monitor(MassIndexingMonitor monitor)
MassIndexingMonitor.
The default monitor just logs the progress.
monitor - The monitor that will track mass indexing progress.this for method chainingMassIndexer failureHandler(MassIndexingFailureHandler failureHandler)
MassIndexingFailureHandler.
The default handler just forwards failures to the
background failure handler.
failureHandler - The handler for failures occurring during mass indexing.this for method chainingCopyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.