Interface StructureGenerator.GenerationContext
- All Superinterfaces:
StructureGenerator.Context
- Enclosing interface:
- StructureGenerator
@PublicApi
public static interface StructureGenerator.GenerationContext
extends StructureGenerator.Context
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddItemChangeFilter(ItemChangeFilter filter) Detect future changes those may affect the forest withItemChangeFiltervoidaddUpdateChecker(UpdateChecker checker) Detect future changes those may affect the forest withUpdateCheckerReturns the forest spec of the forest being generated.<T> TRetrieves the object previously associated with the given forest by this generator.<T> TgetTempObject(Object key) Retrieves the object previously associated with this context by this generator.Returns the forest fragment generated before current generator call.booleanChecks if current generation process is stoppedReturns the item version update since the last time the current forest was generated.itemsUpdate(DataVersion sinceVersion) Returns the item version update since the given version.Returns the forest fragment currently processed by the generator.voidAssociate an object with the current forest.voidputTempObject(Object key, Object value) Associate an object with this context.
-
Method Details
-
addItemChangeFilter
Detect future changes those may affect the forest withItemChangeFilter- Parameters:
filter- the filter to detect changes
-
addUpdateChecker
Detect future changes those may affect the forest withUpdateChecker- Parameters:
checker- the checker to detect changes
-
previewForest
Returns the forest fragment currently processed by the generator. -
inputForest
Returns the forest fragment generated before current generator call. Null if generator driver does not support this feature. -
getForestSpecBeingTransformed
- Returns:
- in case the generation is a transformation, returns forest spec of the forest source being transformed; returns null if the generation is not a transformation (in-structure generation). If multiple transformations take place, the generator running (N+1)th transformation will receive the spec for the result of the Nth transformation.
-
itemsUpdate
Returns the item version update since the last time the current forest was generated. -
itemsUpdate
Returns the item version update since the given version.- Parameters:
sinceVersion- item data version
-
putObject
Associate an object with the current forest. The object will be kept with the generated forest and available to the current generator during future regenerations, unless the generated forest is evicted from cache or its internal caches are cleared.- Parameters:
key- the keyvalue- the value- See Also:
-
getObject
Retrieves the object previously associated with the given forest by this generator. May returnnullif the generated forest was evicted from cache or its internal caches were cleared.- Type Parameters:
T- result type- Parameters:
key- the key- See Also:
-
putTempObject
Associate an object with this context. UnlikeputObject(Object, Object), the object will be available to this generator only during the current regeneration.- Parameters:
key- the keyvalue- the value- See Also:
-
getTempObject
Retrieves the object previously associated with this context by this generator.- Type Parameters:
T- result type- Parameters:
key- the key- See Also:
-
getForestSpec
Returns the forest spec of the forest being generated. -
isStopped
boolean isStopped()Checks if current generation process is stopped- Returns:
- true iff further generation shouldn't be continued, false otherwise
-