|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.search.engine.WorkPlan
public class WorkPlan
Represents the set of changes going to be applied to the index for the entities. A stream of Work is feed as input, a list of LuceneWork is output, and in the process we try to reduce the number of output operations to the minimum needed to reach the same final state.
Constructor Summary | |
---|---|
WorkPlan(SearchFactoryImplementor searchFactoryImplementor)
|
Method Summary | ||
---|---|---|
|
addWork(Work<T> work)
Adds a work to be performed as part of the final plan. |
|
void |
clear()
Removes all scheduled work |
|
List<LuceneWork> |
getPlannedLuceneWork()
Converts the current plan into a list of LuceneWork, something that the backends can actually perform to execute the plan. |
|
void |
processContainedInAndPrepareExecution()
Makes sure that all additional work needed because of containedIn is added to the work plan. |
|
int |
size()
Returns an approximation of the amount of work that #getPlannedLuceneWork(SearchFactoryImplementor) would return. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WorkPlan(SearchFactoryImplementor searchFactoryImplementor)
Method Detail |
---|
public <T> void addWork(Work<T> work)
T
- the type of the work, or of the affected entitywork
- public void clear()
public int size()
#getPlannedLuceneWork(SearchFactoryImplementor)
would return.
This is meant for resource control for auto flushing of large pending batches.
Environment.WORKER_BATCHSIZE
public void processContainedInAndPrepareExecution()
public List<LuceneWork> getPlannedLuceneWork()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |