|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hibernate.search.impl.MassIndexerImpl
public class MassIndexerImpl
Prepares and configures a BatchIndexingWorkspace to start rebuilding the indexes for all entity instances in the database. The type of these entities is either all indexed entities or a subset, always including all subtypes.
Field Summary | |
---|---|
protected Set<Class<?>> |
rootEntities
|
Constructor Summary | |
---|---|
protected |
MassIndexerImpl(SearchFactoryImplementor searchFactory,
SessionFactory sessionFactory,
Class<?>... entities)
|
Method Summary | |
---|---|
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. |
protected BatchCoordinator |
createCoordinator()
|
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(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 |
threadsForIndexWriter(int numberOfThreads)
Deprecated. |
MassIndexer |
threadsForSubsequentFetching(int numberOfThreads)
Sets the number of threads used to load the lazy collections related to the indexed entities. |
MassIndexer |
threadsToLoadObjects(int numberOfThreads)
Set the number of threads to be used to load the root entities. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Set<Class<?>> rootEntities
Constructor Detail |
---|
protected MassIndexerImpl(SearchFactoryImplementor searchFactory, SessionFactory sessionFactory, Class<?>... entities)
Method Detail |
---|
public MassIndexer cacheMode(CacheMode cacheMode)
MassIndexer
cacheMode
in interface MassIndexer
public MassIndexer threadsToLoadObjects(int numberOfThreads)
MassIndexer
threadsToLoadObjects
in interface MassIndexer
public MassIndexer batchSizeToLoadObjects(int batchSize)
MassIndexer
batchSizeToLoadObjects
in interface MassIndexer
public MassIndexer threadsForSubsequentFetching(int numberOfThreads)
MassIndexer
threadsForSubsequentFetching
in interface MassIndexer
@Deprecated public MassIndexer threadsForIndexWriter(int numberOfThreads)
MassIndexer
threadsForIndexWriter
in interface MassIndexer
public MassIndexer progressMonitor(MassIndexerProgressMonitor monitor)
MassIndexer
MassIndexerProgressMonitor
.
progressMonitor
in interface MassIndexer
monitor
- this instance will receive updates about the massindexing progress.
public MassIndexer optimizeOnFinish(boolean optimize)
MassIndexer
optimizeOnFinish
in interface MassIndexer
public MassIndexer optimizeAfterPurge(boolean optimize)
MassIndexer
optimizeAfterPurge
in interface MassIndexer
public MassIndexer purgeAllOnStart(boolean purgeAll)
MassIndexer
purgeAllOnStart
in interface MassIndexer
public Future<?> start()
MassIndexer
start
in interface MassIndexer
public void startAndWait() throws InterruptedException
MassIndexer
startAndWait
in interface MassIndexer
InterruptedException
- if the current thread is interrupted
while waiting.protected BatchCoordinator createCoordinator()
public MassIndexer limitIndexedObjectsTo(long maximum)
MassIndexer
limitIndexedObjectsTo
in interface MassIndexer
public MassIndexer idFetchSize(int idFetchSize)
MassIndexer
Integer.MIN_VALUE
otherwise it will attempt to preload everything in memory.
idFetchSize
in interface MassIndexer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |