Class ProcessingUnitProgressFormatter


  • public class ProcessingUnitProgressFormatter
    extends java.lang.Object
    Defines a processing unit progress formatter.
    • Constructor Detail

      • ProcessingUnitProgressFormatter

        public ProcessingUnitProgressFormatter​(java.lang.String startTag)
        Constructor for ProcessUnitProgressFormatter
        Parameters:
        startTag - the start tag
    • Method Detail

      • toString

        public java.lang.String toString​(java.lang.String id,
                                         java.lang.String name,
                                         java.lang.String processingUnitClass,
                                         java.util.List<Parameter> parameters,
                                         IProcessingUnitContext processingUnitContext,
                                         IProcessingUnitProgress processingProgress,
                                         ProcessingActionStatus processingActionStatus,
                                         ProcessingRuntimeStatus processingRuntimeStatus,
                                         java.util.List<java.lang.String> messages,
                                         IProcessingUnitRuntimeTimeMeasurement timeMeasurement,
                                         com.github.toolarium.common.bandwidth.IBandwidthThrottling processingUnitThrottling,
                                         IProcessingUnitPersistence processingPersistence)
        Format process unit progress
        Parameters:
        id - the id
        name - the name
        processingUnitClass - the processing unit class
        parameters - the parameters
        processingUnitContext - the processing unit context
        processingProgress - the processing unit progress
        processingActionStatus - the action status
        processingRuntimeStatus - the runtime status
        messages - the messages
        timeMeasurement - the time measurement
        processingUnitThrottling - the processing unit throttling
        processingPersistence - the processing persistence
        Returns:
        the formatted message
      • prepareProgressNumbers

        public java.lang.StringBuilder prepareProgressNumbers​(java.lang.String header,
                                                              IProcessingUnitProgress processingProgress,
                                                              boolean includeUnprocessed)
        Prepare process unit runtime time measurement
        Parameters:
        header - the message header
        processingProgress - the processing progress
        includeUnprocessed - true to include unprocessed units
        Returns:
        the prepared string
      • prepareParameters

        public java.lang.StringBuilder prepareParameters​(java.lang.String header,
                                                         java.util.List<Parameter> parameters)
        Prepare parameters
        Parameters:
        header - the message header
        parameters - the parameters
        Returns:
        the prepared string
      • prepareProcessingContext

        public java.lang.StringBuilder prepareProcessingContext​(java.lang.String header,
                                                                IProcessingUnitContext processingUnitContext)
        Prepare process context
        Parameters:
        header - the message header
        processingUnitContext - the processing context
        Returns:
        the prepared string
      • prepareTimeMeasurement

        public java.lang.StringBuilder prepareTimeMeasurement​(java.lang.String header,
                                                              IProcessingUnitRuntimeTimeMeasurement timeMeasurement)
        Prepare process unit runtime time measurement
        Parameters:
        header - the message header
        timeMeasurement - the runtime time measurement
        Returns:
        the prepared string
      • prepareMessages

        public java.lang.StringBuilder prepareMessages​(java.lang.String header,
                                                       java.util.List<java.lang.String> messages)
        Prepare process unit messages
        Parameters:
        header - the message header
        messages - the processing unit messages
        Returns:
        the prepared string
      • prepareStatistic

        public java.lang.StringBuilder prepareStatistic​(java.lang.String header,
                                                        IProcessingUnitStatistic processingStatistic)
        Prepare process unit statistic
        Parameters:
        header - the message header
        processingStatistic - the processing unit statistic
        Returns:
        the prepared string
      • prepareBandwidthThrottling

        public java.lang.StringBuilder prepareBandwidthThrottling​(java.lang.String header,
                                                                  com.github.toolarium.common.bandwidth.IBandwidthThrottling bandwidthThrottling)
        Prepare process unit bandwidth throttling
        Parameters:
        header - the message header
        bandwidthThrottling - the bandwidth throttling
        Returns:
        the prepared string
      • prepareProcesingPersistenceContainer

        public java.lang.StringBuilder prepareProcesingPersistenceContainer​(java.lang.String header,
                                                                            IProcessingUnitPersistence processingPersistence)
        Prepare process unit persistence
        Parameters:
        header - the message header
        processingPersistence - the processing persistence
        Returns:
        the prepared string
      • getStartTag

        public java.lang.String getStartTag()
        Get the start tag
        Returns:
        the start tag