Class SPECpp<C extends Candidate,I extends CompositionComponent<C>,R extends Result,F extends Result>
- java.lang.Object
-
- org.processmining.specpp.componenting.system.link.AbstractBaseClass
-
- org.processmining.specpp.base.impls.SPECpp<C,I,R,F>
-
- All Implemented Interfaces:
FullComponentSystemUser,HasComponentCollection,IsGlobalProvider,UsesGlobalComponentSystem,UsesLocalComponentSystem,Initializable,StartStoppable,Stoppable
- Direct Known Subclasses:
InstrumentedSPECpp
public class SPECpp<C extends Candidate,I extends CompositionComponent<C>,R extends Result,F extends Result> extends AbstractBaseClass implements StartStoppable
-
-
Constructor Summary
Constructors Constructor Description SPECpp(GlobalComponentRepository cr, java.util.List<Supervisor> supervisors, ProposerComponent<C> proposer, ComposerComponent<C,I,R> composer, PostProcessingPipeline<R,F> postProcessor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <C extends Candidate,I extends CompositionComponent<C>,R extends Result,F extends Result>
SPECpp<C,I,R,F>build(SPECppConfigBundle configBundle, InputDataBundle dataBundle)Connects the transitive local component systems of composer subcomponents and proposer subcomponents.voidcancelPECCyclingGracefully()intcurrentCycleCount()FexecuteAll()protected voidexecuteAllPECCycles()protected voidexecuteAllPECCyclesInterruptibly()RexecuteDiscovery()RexecuteDiscoveryInterruptibly()booleanexecutePECCycle()FexecutePostProcessing()FexecutePostProcessing(java.util.function.Consumer<Result> intermediateResultCallback)FexecutePostProcessingInterruptibly()java.util.concurrent.CompletableFuture<F>future(java.util.concurrent.Executor executor)protected voidgenerateResult()Composer<C,I,R>getComposer()GlobalComponentRepositorygetGlobalComponentRepository()RgetInitialResult()FgetPostProcessedResult()PostProcessingPipeline<R,F>getPostProcessor()Proposer<C>getProposer()java.util.Collection<Supervisor>getSupervisors()voidinitSelf()Hook for subclasses to initialize themselves after the initial constructor call.booleanisActive()ClastCandidate()protected voidpreSubComponentInit()voidstart()voidstop()-
Methods inherited from class org.processmining.specpp.componenting.system.link.AbstractBaseClass
collectTransitiveSubcomponents, getComponentCollection, getSubComponents, globalComponentSystem, init, localComponentSystem, postSubComponentInit, registerSubComponent, unregisterSubComponent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.processmining.specpp.componenting.system.FullComponentSystemUser
connectLocalComponentSystem
-
Methods inherited from interface org.processmining.specpp.componenting.traits.UsesLocalComponentSystem
bridgeToChildren
-
-
-
-
Constructor Detail
-
SPECpp
public SPECpp(GlobalComponentRepository cr, java.util.List<Supervisor> supervisors, ProposerComponent<C> proposer, ComposerComponent<C,I,R> composer, PostProcessingPipeline<R,F> postProcessor)
-
-
Method Detail
-
build
public static <C extends Candidate,I extends CompositionComponent<C>,R extends Result,F extends Result> SPECpp<C,I,R,F> build(SPECppConfigBundle configBundle, InputDataBundle dataBundle)
Connects the transitive local component systems of composer subcomponents and proposer subcomponents. That is, first {@see connectLocalComponentSystem} collects and requirements from the leafs to the respective proposer/composer root and continuously fulfills them on the way. At the end of this step, all requirements and provisions are collected inproposerLcrandcomposerLcr. These are then fulfilled by each other and finally fulfilled by this component. The tree structure will typically look something like this, if all implementations in this chain properly register their subcomponents: place proposer -> enumerating tree -> child generation logic -> tree expansion strategy rec. composer 1 -> .. -> rec. composer n -> terminal composer -> rec. composition 1 -> .. -> rec. composition n -> terminal composition
-
getGlobalComponentRepository
public GlobalComponentRepository getGlobalComponentRepository()
-
getInitialResult
public R getInitialResult()
-
getPostProcessedResult
public F getPostProcessedResult()
-
preSubComponentInit
protected void preSubComponentInit()
- Overrides:
preSubComponentInitin classAbstractBaseClass
-
initSelf
public void initSelf()
Description copied from class:AbstractBaseClassHook for subclasses to initialize themselves after the initial constructor call. At the time this is called, all fulfillable local & global component system requests will be fulfilled. Unless advanced interaction with the underlying systems is required, this is the only relevant hook for user-defined subclasses.- Specified by:
initSelfin classAbstractBaseClass
-
start
public void start()
- Specified by:
startin interfaceStartStoppable
-
executePECCycle
public boolean executePECCycle()
-
cancelPECCyclingGracefully
public void cancelPECCyclingGracefully()
-
executeAllPECCycles
protected void executeAllPECCycles()
-
executeAllPECCyclesInterruptibly
protected void executeAllPECCyclesInterruptibly() throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
generateResult
protected void generateResult()
-
executeDiscoveryInterruptibly
public final R executeDiscoveryInterruptibly() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
executeDiscovery
public final R executeDiscovery()
-
executePostProcessing
public final F executePostProcessing()
-
executePostProcessingInterruptibly
public final F executePostProcessingInterruptibly() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
executePostProcessing
public final F executePostProcessing(java.util.function.Consumer<Result> intermediateResultCallback)
-
executeAll
public F executeAll()
-
future
public java.util.concurrent.CompletableFuture<F> future(java.util.concurrent.Executor executor)
-
currentCycleCount
public int currentCycleCount()
-
lastCandidate
public C lastCandidate()
-
isActive
public boolean isActive()
-
getSupervisors
public java.util.Collection<Supervisor> getSupervisors()
-
getPostProcessor
public PostProcessingPipeline<R,F> getPostProcessor()
-
-