Class PlanRunnerResult

    • Field Detail

      • executionId

        protected final java.lang.String executionId
      • rootReportNodeId

        protected final java.lang.String rootReportNodeId
    • Constructor Detail

      • PlanRunnerResult

        public PlanRunnerResult​(java.lang.String executionId,
                                java.lang.String rootReportNodeId,
                                ReportTreeAccessor reportTreeAccessor)
      • PlanRunnerResult

        public PlanRunnerResult​(java.lang.String executionId,
                                java.lang.String rootReportNodeId,
                                ReportTreeAccessor reportTreeAccessor,
                                ResourceManager resourceManager)
    • Method Detail

      • getExecutionId

        public java.lang.String getExecutionId()
      • visitReportNodes

        public PlanRunnerResult visitReportNodes​(java.util.function.Consumer<ReportNode> consumer)
        Visits the report tree of the execution using the Consumer of ReportNode
        Parameters:
        consumer -
        Returns:
      • waitForExecutionToTerminate

        public PlanRunnerResult waitForExecutionToTerminate​(long timeout)
                                                     throws java.util.concurrent.TimeoutException,
                                                            java.lang.InterruptedException
        Wait for an the execution to terminate
        Parameters:
        timeout - the timeout in ms
        Returns:
        Throws:
        java.util.concurrent.TimeoutException
        java.lang.InterruptedException
      • waitForExecutionToTerminate

        public PlanRunnerResult waitForExecutionToTerminate()
                                                     throws java.util.concurrent.TimeoutException,
                                                            java.lang.InterruptedException
        Wait indefinitely for an the execution to terminate
        Returns:
        Throws:
        java.util.concurrent.TimeoutException
        java.lang.InterruptedException
      • printTree

        public PlanRunnerResult printTree()
                                   throws java.io.IOException
        Prints the result tree to the standard output
        Returns:
        Throws:
        java.io.IOException
      • printTree

        public PlanRunnerResult printTree​(java.io.Writer writer)
                                   throws java.io.IOException
        Prints the result tree to the Writer provided as input
        Parameters:
        writer -
        Returns:
        Throws:
        java.io.IOException
      • printTree

        public PlanRunnerResult printTree​(java.io.Writer writer,
                                          boolean printAttachments)
                                   throws java.io.IOException
        Prints the result tree to the Writer provided as input
        Parameters:
        writer -
        printAttachments - if the attachments of the report nodes have to be printed out (currently restricted to attachments called "exception.log")
        Returns:
        Throws:
        java.io.IOException
      • getTreeAsString

        public java.lang.String getTreeAsString()
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • writeReport

        public PlanRunnerResult writeReport​(ReportWriter reportWriter,
                                            java.io.File outputFile)
                                     throws java.io.IOException
        Writes a report of the execution using the provided ReportWriter
        Parameters:
        reportWriter - the ReportWriter to be used to write the report
        outputFile - the output file of the report
        Returns:
        this instance
        Throws:
        java.io.IOException - if an exception occurs while writing the report