|
||||||||||
| 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 java.util.Set<java.lang.Class<?>> |
rootEntities
|
| Constructor Summary | |
|---|---|
protected |
MassIndexerImpl(SearchFactoryImplementor searchFactory,
org.hibernate.SessionFactory sessionFactory,
java.lang.Class<?>... entities)
|
| Method Summary | |
|---|---|
MassIndexer |
batchSizeToLoadObjects(int batchSize)
Sets the batch size used to load the root entities. |
MassIndexer |
cacheMode(org.hibernate.CacheMode cacheMode)
Sets the cache interaction mode for the data loading tasks. |
protected BatchCoordinator |
createCoordinator()
|
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 |
purgeAllOnStart(boolean purgeAll)
If all entities should be removed from the index before starting using purgeAll. |
java.util.concurrent.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)
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 java.util.Set<java.lang.Class<?>> rootEntities
| Constructor Detail |
|---|
protected MassIndexerImpl(SearchFactoryImplementor searchFactory,
org.hibernate.SessionFactory sessionFactory,
java.lang.Class<?>... entities)
| Method Detail |
|---|
public MassIndexer cacheMode(org.hibernate.CacheMode cacheMode)
MassIndexer
cacheMode in interface MassIndexerpublic MassIndexer threadsToLoadObjects(int numberOfThreads)
MassIndexer
threadsToLoadObjects in interface MassIndexerpublic MassIndexer batchSizeToLoadObjects(int batchSize)
MassIndexer
batchSizeToLoadObjects in interface MassIndexerpublic MassIndexer threadsForSubsequentFetching(int numberOfThreads)
MassIndexer
threadsForSubsequentFetching in interface MassIndexerpublic MassIndexer optimizeOnFinish(boolean optimize)
MassIndexer
optimizeOnFinish in interface MassIndexerpublic MassIndexer optimizeAfterPurge(boolean optimize)
MassIndexer
optimizeAfterPurge in interface MassIndexerpublic MassIndexer purgeAllOnStart(boolean purgeAll)
MassIndexer
purgeAllOnStart in interface MassIndexerpublic java.util.concurrent.Future<?> start()
MassIndexer
start in interface MassIndexer
public void startAndWait()
throws java.lang.InterruptedException
MassIndexer
startAndWait in interface MassIndexerjava.lang.InterruptedException - if the current thread is interrupted
while waiting.protected BatchCoordinator createCoordinator()
public MassIndexer limitIndexedObjectsTo(long maximum)
MassIndexer
limitIndexedObjectsTo in interface MassIndexer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||