Record Class PipesResult

java.lang.Object
java.lang.Record
org.apache.tika.pipes.api.PipesResult
All Implemented Interfaces:
Serializable

public record PipesResult(PipesResult.RESULT_STATUS status, EmitData emitData, String message) extends Record implements Serializable
See Also:
  • Constructor Details

  • Method Details

    • getCategory

      public PipesResult.CATEGORY getCategory()
      Gets the high-level category for this result.
      Returns:
      the category (FATAL, INITIALIZATION_FAILURE, TASK_EXCEPTION, PROCESS_CRASH, or SUCCESS)
    • isFatal

      public boolean isFatal()
      Checks if this result represents a fatal error.

      Fatal errors mean the system cannot continue and must be fixed and restarted.

      Returns:
      true if this is a fatal error
    • isInitializationFailure

      public boolean isInitializationFailure()
      Checks if this result represents an initialization failure.

      Initialization failures occur when a component (fetcher, emitter, client) fails to start. These might be transient (e.g., network issues) or require configuration fixes.

      Returns:
      true if a component failed to initialize
    • isTaskException

      public boolean isTaskException()
      Checks if this result represents a task-level exception.

      Task exceptions indicate this specific task failed, but other tasks may succeed. Processing can continue with the next task.

      Returns:
      true if this task failed
    • isProcessCrash

      public boolean isProcessCrash()
      Checks if this result represents a process crash (OOM, timeout, etc.).

      Process crashes are system-level failures where the forked process terminated abnormally. The process will be auto-restarted and processing can continue.

      Returns:
      true if the forked process crashed
    • isSuccess

      public boolean isSuccess()
      Checks if this result represents successful processing.

      Success includes normal completion as well as cases where processing completed with warnings (e.g., PARSE_SUCCESS_WITH_EXCEPTION).

      Returns:
      true if processing completed successfully (possibly with warnings)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • status

      public PipesResult.RESULT_STATUS status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • emitData

      public EmitData emitData()
      Returns the value of the emitData record component.
      Returns:
      the value of the emitData record component
    • message

      public String message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component