Interface ProcessingResultBuilder


public interface ProcessingResultBuilder
Builder to compose the processing result
  • 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

      ProcessingResultBuilder appendPostCommitTask(PostCommitTask task)
      Appends a task to be executed after a successful commit ProcessingResultBuilder (replacement for side effects)
      Returns:
      returns itself for method chaining
    • 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

    • canWriteEventOfLength

      boolean canWriteEventOfLength(int eventLength)
    • getMaxEventLength

      int getMaxEventLength()