Interface CommandProcessor<T extends UnifiedRecordValue>
- All Known Implementing Classes:
JobCancelProcessor
,JobCompleteProcessor
,JobThrowErrorProcessor
,JobUpdateRetriesProcessor
,ProcessInstanceCreationCreateProcessor
,ProcessInstanceCreationCreateWithResultProcessor
public interface CommandProcessor<T extends UnifiedRecordValue>
High-level record processor abstraction that implements the common behavior of most
command-handling processors.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
afterAccept
(TypedCommandWriter commandWriter, StateWriter stateWriter, long key, Intent intent, T value) default boolean
onCommand
(TypedRecord<T> command, CommandProcessor.CommandControl<T> commandControl) tryHandleError
(TypedRecord<T> command, Throwable error) Try to handle an error that occurred during processing.
-
Method Details
-
onCommand
default boolean onCommand(TypedRecord<T> command, CommandProcessor.CommandControl<T> commandControl) -
afterAccept
default void afterAccept(TypedCommandWriter commandWriter, StateWriter stateWriter, long key, Intent intent, T value) -
tryHandleError
default TypedRecordProcessor.ProcessingError tryHandleError(TypedRecord<T> command, Throwable error) Try to handle an error that occurred during processing.- Parameters:
command
- The command that was being processed when the error occurrederror
- The error that occurred, and the processor should attempt to handle- Returns:
- The type of the processing error. Default:
TypedRecordProcessor.ProcessingError.UNEXPECTED_ERROR
.
-