Package io.camunda.zeebe.stream.impl
Class ProcessingStateMachine
java.lang.Object
io.camunda.zeebe.stream.impl.ProcessingStateMachine
Represents the processing state machine, which is executed on normal processing.
+------------------+ +--------------------+
| | | | exception
| tryToReadNextRecord() |----------->| processCommand() |------------------+
| | | | v
+------------------+ +--------------------+ +---------------+
^ | | |------+
| | +-------------->| onError() | | exception
| | | exception | |invalid input: '<'-----+
| +-------v-------------+ +---------------+
| | | |
| | writeRecords() | |
| | |invalid input: '<'----------------+
+----------------------+ +---------------------+
| | |
| executeSideEffects() | v
| | +----------------------+
+----------------------+ | |
^ | updateState() |
+--------------------| |
+----------------------+
^ |
| | exception
| |
+---------v----+
| |
| onError() |
| |
+--------------+
^ |
| | exception
+-----+
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProcessingStateMachine(StreamProcessorContext context, BooleanSupplier shouldProcessNext, List<RecordProcessor> recordProcessors, ScheduledCommandCache scheduledCommandCache) -
Method Summary
Modifier and TypeMethodDescriptionlonglongbooleanBe aware this is a transient property which can change anytime, e.g. if a new command is written to the log.booleanvoidstartProcessing(LastProcessingPositions lastProcessingPositions)
-
Field Details
-
WARN_MESSAGE_BATCH_PROCESSING_RETRY
- See Also:
-
-
Constructor Details
-
ProcessingStateMachine
public ProcessingStateMachine(StreamProcessorContext context, BooleanSupplier shouldProcessNext, List<RecordProcessor> recordProcessors, ScheduledCommandCache scheduledCommandCache)
-
-
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
-