Class AbstractPostponingComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result,L extends CandidateConstraint<C>>
- java.lang.Object
-
- org.processmining.specpp.componenting.system.link.AbstractBaseClass
-
- org.processmining.specpp.base.impls.RecursiveComposer<C,I,R>
-
- org.processmining.specpp.base.impls.AbstractPostponingComposer<C,I,R,L>
-
- All Implemented Interfaces:
java.util.function.Consumer<C>,Composer<C,I,R>,Constrainer<L>,ConstrainingComposer<C,I,R,L>,FullComponentSystemUser,ComposerComponent<C,I,R>,HasComponentCollection,IsGlobalProvider,UsesGlobalComponentSystem,UsesLocalComponentSystem,ExposesObservable<L>,Initializable,Triggerable
- Direct Known Subclasses:
AbstractQueueingComposer,UniwiredComposer
public abstract class AbstractPostponingComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result,L extends CandidateConstraint<C>> extends RecursiveComposer<C,I,R> implements ConstrainingComposer<C,I,R,L>, Triggerable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractPostponingComposer.CandidateDecision
-
Field Summary
-
Fields inherited from class org.processmining.specpp.base.impls.RecursiveComposer
childComposer
-
-
Constructor Summary
Constructors Constructor Description AbstractPostponingComposer(ComposerComponent<C,I,R> childComposer)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaccept(C candidate)Hook method which decides how to handle an incoming candidate.protected voidacceptCandidate(C candidate)voidcandidatesAreExhausted()Hook method which is called when this composer will not receive any more candidates in the future as the connected proposer has been exhausted.protected abstract AbstractPostponingComposer.CandidateDecisiondeliberateCandidate(C candidate)protected abstract voiddiscardCandidate(C candidate)Observable<L>getConstraintPublisher()protected abstract booleaniteratePostponedCandidates()Hook method to define one iteration of postponed candidates traversal.protected intiteratePostponedCandidatesUntilNoChange()protected abstract voidpostponeDecision(C candidate)protected voidpublishConstraint(L constraint)protected abstract voidrejectCandidate(C candidate)voidtrigger()-
Methods inherited from class org.processmining.specpp.base.impls.RecursiveComposer
forward, generateResult, getIntermediateResult, isFinished
-
Methods inherited from class org.processmining.specpp.componenting.system.link.AbstractBaseClass
collectTransitiveSubcomponents, getComponentCollection, getSubComponents, globalComponentSystem, init, initSelf, localComponentSystem, postSubComponentInit, preSubComponentInit, 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.base.Composer
generateResult, getIntermediateResult, isFinished
-
Methods inherited from interface org.processmining.specpp.base.Constrainer
getObservable, getPublishedConstraintClass
-
Methods inherited from interface org.processmining.specpp.componenting.system.FullComponentSystemUser
collectTransitiveSubcomponents, connectLocalComponentSystem, getComponentCollection, registerSubComponent, unregisterSubComponent
-
Methods inherited from interface org.processmining.specpp.traits.Initializable
init
-
Methods inherited from interface org.processmining.specpp.componenting.traits.UsesGlobalComponentSystem
globalComponentSystem
-
Methods inherited from interface org.processmining.specpp.componenting.traits.UsesLocalComponentSystem
bridgeToChildren, localComponentSystem
-
-
-
-
Constructor Detail
-
AbstractPostponingComposer
public AbstractPostponingComposer(ComposerComponent<C,I,R> childComposer)
-
-
Method Detail
-
publishConstraint
protected final void publishConstraint(L constraint)
-
getConstraintPublisher
public final Observable<L> getConstraintPublisher()
- Specified by:
getConstraintPublisherin interfaceConstrainer<C extends Candidate>
-
accept
public void accept(C candidate)
Description copied from interface:ComposerHook method which decides how to handle an incoming candidate. The internal logic decides whether the candidate is eventually added to the current composition.- Specified by:
acceptin interfaceComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result>- Specified by:
acceptin interfacejava.util.function.Consumer<C extends Candidate>- Specified by:
acceptin classRecursiveComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result>- Parameters:
candidate- the candidate that has been offered to this composer
-
deliberateCandidate
protected abstract AbstractPostponingComposer.CandidateDecision deliberateCandidate(C candidate)
-
iteratePostponedCandidates
protected abstract boolean iteratePostponedCandidates()
Hook method to define one iteration of postponed candidates traversal. It will be called repeatedly until there are no more changes.- Returns:
- true if the set of postponed candidates changed
-
iteratePostponedCandidatesUntilNoChange
protected int iteratePostponedCandidatesUntilNoChange()
-
postponeDecision
protected abstract void postponeDecision(C candidate)
-
acceptCandidate
protected void acceptCandidate(C candidate)
-
rejectCandidate
protected abstract void rejectCandidate(C candidate)
-
discardCandidate
protected abstract void discardCandidate(C candidate)
-
trigger
public final void trigger()
- Specified by:
triggerin interfaceTriggerable
-
candidatesAreExhausted
public void candidatesAreExhausted()
Description copied from interface:ComposerHook method which is called when this composer will not receive any more candidates in the future as the connected proposer has been exhausted.- Specified by:
candidatesAreExhaustedin interfaceComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result>- Overrides:
candidatesAreExhaustedin classRecursiveComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result>
-
-