Package org.hibernate.search.engine
Class WorkPlan
java.lang.Object
org.hibernate.search.engine.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.
- Since:
- 3.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> voidAdds a work to be performed as part of the final plan.voidclear()Removes all scheduled workConverts the current plan into a list of LuceneWork, something that the backends can actually perform to execute the plan.voidMakes sure that all additional work needed because of containedIn is added to the work plan.intsize()Returns an approximation of the amount of work thatwould return.invalid reference
#getPlannedLuceneWork(SearchFactoryImplementor)
-
Constructor Details
-
WorkPlan
-
-
Method Details
-
addWork
Adds a work to be performed as part of the final plan.- Type Parameters:
T- the type of the work, or of the affected entity- Parameters:
work-
-
clear
public void clear()Removes all scheduled work -
size
public int size()Returns an approximation of the amount of work thatwould return. This is meant for resource control for auto flushing of large pending batches.invalid reference
#getPlannedLuceneWork(SearchFactoryImplementor)- Returns:
- the approximation
- See Also:
-
processContainedInAndPrepareExecution
public void processContainedInAndPrepareExecution()Makes sure that all additional work needed because of containedIn is added to the work plan. -
getPlannedLuceneWork
Converts the current plan into a list of LuceneWork, something that the backends can actually perform to execute the plan.- Returns:
-