Class ProcessingStateMachine
java.lang.Object
io.camunda.zeebe.engine.processing.streamprocessor.ProcessingStateMachine
Represents the processing state machine, which is executed on normal processing.
+-----------------+ +--------------------+
| | | | exception
| readNextEvent() |------------>| processEvent() |------------------+
| | | | v
+-----------------+ +--------------------+ +---------------+
^ | | |------+
| | +-------------->| onError() | | exception
| | | exception | |<-----+
| +-------v-------------+ +---------------+
| | | |
| | writeEvent() | |
| | |<----------------+
+----------------------+ +---------------------+
| | |
| executeSideEffects() | v
| | +----------------------+
+----------------------+ | |
^ | updateState() |
+--------------------| |
+----------------------+
^ |
| | exception
| |
+---------v----+
| |
| onError() |
| |
+--------------+
^ |
| | exception
+-----+
-
Constructor Summary
ConstructorsConstructorDescriptionProcessingStateMachine(ProcessingContext context, BooleanSupplier shouldProcessNext) -
Method Summary
Modifier and TypeMethodDescriptionlonglongbooleanBe aware this is a transient property which can change anytime, e.g.booleanvoidsetSideEffectProducer(SideEffectProducer sideEffectProducer) voidstartProcessing(LastProcessingPositions lastProcessingPositions)
-
Constructor Details
-
ProcessingStateMachine
-
-
Method Details
-
hasReachedEnd
public boolean hasReachedEnd()Be aware this is a transient property which can change anytime, e.g. if a new command is written to the log.- Returns:
- true if the ProcessingStateMachine has reached the end of the log and nothing is left to being processed/applied, false otherwise
-
setSideEffectProducer
-
getLastSuccessfulProcessedEventPosition
public long getLastSuccessfulProcessedEventPosition() -
getLastWrittenPosition
public long getLastWrittenPosition() -
isMakingProgress
public boolean isMakingProgress() -
startProcessing
-