Package io.atomix.raft.zeebe
Interface EntryValidator
- All Known Implementing Classes:
EntryValidator.NoopEntryValidator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA simple validator which always returnsEntryValidator.ValidationResult.ok().static final recordResult of validating an entry. -
Method Summary
Modifier and TypeMethodDescriptionvalidateEntry(ApplicationEntry lastEntry, ApplicationEntry entry) Validates the current entry, which should be append to the log, and compares it with the last appended entry to ensure consistency.
-
Method Details
-
validateEntry
Validates the current entry, which should be append to the log, and compares it with the last appended entry to ensure consistency. The ValidationResult reflects the outcome of the validation and holds an error message when the validation fails.- Parameters:
lastEntry- the previous zeebe entryentry- the zeebe entry to be appended- Returns:
- a ValidationResult containing the validation result and an error message, if it failed
-