Class ProcessingStateMachine
java.lang.Object
io.camunda.zeebe.engine.processing.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
(ProcessingContext context, BooleanSupplier shouldProcessNext) -
Method Summary
Modifier and TypeMethodDescriptionlong
long
boolean
Be aware this is a transient property which can change anytime, e.g.boolean
void
setSideEffectProducer
(SideEffectProducer sideEffectProducer) void
startProcessing
(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
-
getLastSuccessfulProcessedRecordPosition
public long getLastSuccessfulProcessedRecordPosition() -
getLastWrittenPosition
public long getLastWrittenPosition() -
isMakingProgress
public boolean isMakingProgress() -
startProcessing
-