Class InstrumentedComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result>
- java.lang.Object
-
- org.processmining.specpp.componenting.delegators.AbstractDelegator<T>
-
- org.processmining.specpp.componenting.delegators.AbstractFCSUDelegator<T>
-
- org.processmining.specpp.supervision.instrumentators.AbstractInstrumentingDelegator<ComposerComponent<C,I,R>>
-
- org.processmining.specpp.supervision.instrumentators.InstrumentedComposer<C,I,R>
-
- All Implemented Interfaces:
java.util.function.Consumer<C>,Composer<C,I,R>,Container<ComposerComponent<C,I,R>>,Delegator<ComposerComponent<C,I,R>>,FullComponentSystemUser,ComposerComponent<C,I,R>,HasComponentCollection,IsGlobalProvider,UsesGlobalComponentSystem,UsesLocalComponentSystem,Initializable
public class InstrumentedComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result> extends AbstractInstrumentingDelegator<ComposerComponent<C,I,R>> implements ComposerComponent<C,I,R>
-
-
Field Summary
Fields Modifier and Type Field Description static TaskDescriptionCANDIDATE_COMPOSITIONstatic TaskDescriptionRESULT_GENERATION-
Fields inherited from class org.processmining.specpp.supervision.instrumentators.AbstractInstrumentingDelegator
timeStopper
-
Fields inherited from class org.processmining.specpp.componenting.delegators.AbstractDelegator
delegate
-
-
Constructor Summary
Constructors Constructor Description InstrumentedComposer(ComposerComponent<C,I,R> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(C c)Hook method which decides how to handle an incoming 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.RgenerateResult()Hook method where a final result is computed from the incrementally built up intermediate result.IgetIntermediateResult()Typically just returns the internally managed composition.booleanisFinished()Whether this composer has reached a state where it does not want to handle new candidates.-
Methods inherited from class org.processmining.specpp.componenting.delegators.AbstractFCSUDelegator
collectTransitiveSubcomponents, connectLocalComponentSystem, getComponentCollection, globalComponentSystem, init, localComponentSystem, registerSubComponent, unregisterSubComponent
-
Methods inherited from class org.processmining.specpp.componenting.delegators.AbstractDelegator
equals, getDelegate, hashCode, isSet, setDelegate, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.processmining.specpp.componenting.delegators.Container
isNonEmpty
-
Methods inherited from interface org.processmining.specpp.componenting.delegators.Delegator
addContent, isEmpty, isFull
-
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
-
-
-
-
Field Detail
-
CANDIDATE_COMPOSITION
public static final TaskDescription CANDIDATE_COMPOSITION
-
RESULT_GENERATION
public static final TaskDescription RESULT_GENERATION
-
-
Constructor Detail
-
InstrumentedComposer
public InstrumentedComposer(ComposerComponent<C,I,R> delegate)
-
-
Method Detail
-
isFinished
public boolean isFinished()
Description copied from interface:ComposerWhether this composer has reached a state where it does not want to handle new candidates.- Specified by:
isFinishedin interfaceComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result>- Returns:
- true iff no more candidates will be accepted
-
getIntermediateResult
public I getIntermediateResult()
Description copied from interface:ComposerTypically just returns the internally managed composition. Care must be taken, that this method may be called asynchronously.- Specified by:
getIntermediateResultin interfaceComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result>- Returns:
- the intermediate result
-
generateResult
public R generateResult()
Description copied from interface:ComposerHook method where a final result is computed from the incrementally built up intermediate result.- Specified by:
generateResultin interfaceComposer<C extends Candidate,I extends CompositionComponent<C>,R extends Result>- Returns:
- the final result
-
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>
-
-