Package io.camunda.zeebe.engine.api
Interface ProcessingResultBuilder
public interface ProcessingResultBuilder
Builder to compose the processing result
-
Method Summary
Modifier and TypeMethodDescriptionAppends a task to be executed after a successful commit ProcessingResultBuilder (replacement for side effects)appendRecord(long key, RecordType type, Intent intent, RejectionType rejectionType, String rejectionReason, RecordValue value) Appends a record to the resultbuild()booleancanWriteEventOfLength(int eventLength) intreset()Resets the processing result build to its initial states (removes all follow-up records, the response and post-commit tasks.Resets itself with the post commit tasks resetwithResponse(RecordType type, long key, Intent intent, UnpackedObject value, ValueType valueType, RejectionType rejectionType, String rejectionReason, long requestId, int requestStreamId) Sets the response for the result; will be overwritten if called more than once
-
Method Details
-
appendRecord
ProcessingResultBuilder appendRecord(long key, RecordType type, Intent intent, RejectionType rejectionType, String rejectionReason, RecordValue value) Appends a record to the result- Returns:
- returns itself for method chaining
-
withResponse
ProcessingResultBuilder withResponse(RecordType type, long key, Intent intent, UnpackedObject value, ValueType valueType, RejectionType rejectionType, String rejectionReason, long requestId, int requestStreamId) Sets the response for the result; will be overwritten if called more than once- Returns:
- returns itself for method chaining
-
appendPostCommitTask
Appends a task to be executed after a successful commit ProcessingResultBuilder (replacement for side effects)- Returns:
- returns itself for method chaining
-
reset
ProcessingResultBuilder reset()Resets the processing result build to its initial states (removes all follow-up records, the response and post-commit tasks.- Returns:
- returns itself for method chaining
-
resetPostCommitTasks
ProcessingResultBuilder resetPostCommitTasks()Resets itself with the post commit tasks reset- Returns:
- itself for method chaining
-
build
ProcessingResult build() -
canWriteEventOfLength
boolean canWriteEventOfLength(int eventLength) -
getMaxEventLength
int getMaxEventLength()
-