Class ProcessingUnitProgressFormatter
- java.lang.Object
-
- com.github.toolarium.processing.unit.util.ProcessingUnitProgressFormatter
-
public class ProcessingUnitProgressFormatter extends java.lang.ObjectDefines a processing unit progress formatter.
-
-
Constructor Summary
Constructors Constructor Description ProcessingUnitProgressFormatter(java.lang.String id, java.lang.String name, java.lang.Class<? extends IProcessingUnit> processingUnitClass)Constructor for ProcessUnitProgressFormatter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringformatProgress(IProcessingProgress processingProgress, ProcessingActionStatus processingActionStatus, ProcessingRuntimeStatus processingRuntimeStatus, java.util.List<java.lang.String> messages, IProcessingUnitRuntimeTimeMeasurement timeMeasurement, com.github.toolarium.common.bandwidth.IBandwidthThrottling processingUnitThrottling)Format process unit progressjava.lang.StringBuilderprepareBandwidthThrottling(java.lang.String header, com.github.toolarium.common.bandwidth.IBandwidthThrottling bandwidthThrottling)Prepare process unit bandwidth throttlingjava.lang.StringBuilderprepareMessages(java.lang.String header, java.util.List<java.lang.String> messages)Prepare process unit messagesjava.lang.StringBuilderprepareProgressNumbers(java.lang.String header, IProcessingProgress processingProgress, boolean includeUnprocessed)Prepare process unit runtime time measurementjava.lang.StringBuilderprepareStatistic(java.lang.String header, IProcessingStatistic processingStatistic)Prepare process unit statisticjava.lang.StringBuilderprepareTimeMeasurement(java.lang.String header, IProcessingUnitRuntimeTimeMeasurement timeMeasurement)Prepare process unit runtime time measurementvoidsetStartTag(java.lang.String startTag)Format process unit progress
-
-
-
Constructor Detail
-
ProcessingUnitProgressFormatter
public ProcessingUnitProgressFormatter(java.lang.String id, java.lang.String name, java.lang.Class<? extends IProcessingUnit> processingUnitClass)Constructor for ProcessUnitProgressFormatter- Parameters:
id- the idname- the nameprocessingUnitClass- the processing unit class
-
-
Method Detail
-
setStartTag
public void setStartTag(java.lang.String startTag)
Format process unit progress- Parameters:
startTag- the start tag
-
formatProgress
public java.lang.String formatProgress(IProcessingProgress processingProgress, ProcessingActionStatus processingActionStatus, ProcessingRuntimeStatus processingRuntimeStatus, java.util.List<java.lang.String> messages, IProcessingUnitRuntimeTimeMeasurement timeMeasurement, com.github.toolarium.common.bandwidth.IBandwidthThrottling processingUnitThrottling)
Format process unit progress- Parameters:
processingProgress- the progressprocessingActionStatus- the action statusprocessingRuntimeStatus- the runtime statusmessages- the messagestimeMeasurement- the time measurementprocessingUnitThrottling- the processing unit throttling- Returns:
- the formatted message
-
prepareProgressNumbers
public java.lang.StringBuilder prepareProgressNumbers(java.lang.String header, IProcessingProgress processingProgress, boolean includeUnprocessed)Prepare process unit runtime time measurement- Parameters:
header- the message headerprocessingProgress- the processing progressincludeUnprocessed- true to include unprocessed units- 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 headertimeMeasurement- 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 headermessages- the processing unit messages- Returns:
- the prepared string
-
prepareStatistic
public java.lang.StringBuilder prepareStatistic(java.lang.String header, IProcessingStatistic processingStatistic)Prepare process unit statistic- Parameters:
header- the message headerprocessingStatistic- 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 headerbandwidthThrottling- the bandwidth throttling- Returns:
- the prepared string
-
-