Package io.camunda.zeebe.streamprocessor
Class ProcessingStateMachine
java.lang.Object
io.camunda.zeebe.streamprocessor.ProcessingStateMachine
Represents the processing state machine, which is executed on normal processing.
+------------------+ +--------------------+
| | | | exception
| readNextRecord() |----------->| processCommand() |------------------+
| | | | v
+------------------+ +--------------------+ +---------------+
^ | | |------+
| | +-------------->| onError() | | exception
| | | exception | |<-----+
| +-------v-------------+ +---------------+
| | | |
| | writeRecords() | |
| | |<----------------+
+----------------------+ +---------------------+
| | |
| executeSideEffects() | v
| | +----------------------+
+----------------------+ | |
^ | updateState() |
+--------------------| |
+----------------------+
^ |
| | exception
| |
+---------v----+
| |
| onError() |
| |
+--------------+
^ |
| | exception
+-----+
-
Constructor Summary
ConstructorsConstructorDescriptionProcessingStateMachine(StreamProcessorContext context, BooleanSupplier shouldProcessNext, RecordProcessor engine) -
Method Summary
Modifier and TypeMethodDescriptionlonglongbooleanBe aware this is a transient property which can change anytime, e.g.booleanvoidstartProcessing(LastProcessingPositions lastProcessingPositions)
-
Constructor Details
-
ProcessingStateMachine
public ProcessingStateMachine(StreamProcessorContext context, BooleanSupplier shouldProcessNext, RecordProcessor engine)
-
-
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
-
getLastSuccessfulProcessedRecordPosition
public long getLastSuccessfulProcessedRecordPosition() -
getLastWrittenPosition
public long getLastWrittenPosition() -
isMakingProgress
public boolean isMakingProgress() -
startProcessing
-