Package org.uberfire.ext.metadata.io
Class ConstrainedIndexerScheduler.ConstraintBuilder
- java.lang.Object
-
- org.uberfire.ext.metadata.io.ConstrainedIndexerScheduler.ConstraintBuilder
-
- Enclosing class:
- ConstrainedIndexerScheduler
public static class ConstrainedIndexerScheduler.ConstraintBuilder extends Object
Builder for defining priorities and dependencies ofIndexerjobs.
-
-
Constructor Summary
Constructors Constructor Description ConstraintBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstrainedIndexerScheduler.ConstraintBuilderaddConstraint(String fromIndexerId, String toIndexerId)Assigns a constraint where one indexer must run after another indexer.ConstrainedIndexerScheduler.ConstraintBuilderaddPriority(String indexerId, int priority)Assigns a priority to the indexer with the given ID.org.uberfire.ext.metadata.engine.IndexerScheduler.FactorycreateFactory()
-
-
-
Method Detail
-
addPriority
public ConstrainedIndexerScheduler.ConstraintBuilder addPriority(String indexerId, int priority)
Assigns a priority to the indexer with the given ID. Lower numbers mean that the indexer will be scheduled to run earlier (but always after indexers it depends on viaaddConstraint(String, String)).- Parameters:
indexerId- The ID of an indexer. Must not be null.priority- The priority assigned to this indexer. Lower numbers mean earlier scheduling.- Returns:
- This builder. Never null.
- See Also:
addConstraint(String, String)
-
addConstraint
public ConstrainedIndexerScheduler.ConstraintBuilder addConstraint(String fromIndexerId, String toIndexerId)
Assigns a constraint where one indexer must run after another indexer.- Parameters:
fromIndexerId- The indexer that must complete first. Must not be null.toIndexerId- The indexer that must start after the former completes. Must not be null.- Returns:
- This builder. Never null.
-
createFactory
public org.uberfire.ext.metadata.engine.IndexerScheduler.Factory createFactory()
-
-