Class ProcessingProgress
- java.lang.Object
-
- com.github.toolarium.processing.unit.runtime.ProcessingProgress
-
- All Implemented Interfaces:
IProcessingProgress,java.io.Serializable
public class ProcessingProgress extends java.lang.Object implements IProcessingProgress, java.io.Serializable
Implements theIProcessingProgress.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProcessingProgress()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStatistic(java.lang.String key, java.lang.Double value)Adds a statistic valuebooleanequals(java.lang.Object obj)IProcessingStatisticgetProcesingStatistic()The processing statistic.longgetProcessedUnits()Gets the number of processed units.java.lang.StringgetProcessingStatusMessage()Returns the processing status messageProcessingStatusTypegetProcessingStatusType()The processing status type which covers the overall statuslonggetTotalFailedUnits()Gets the number of failed units.longgetTotalUnits()Gets the number of total processed unit.inthashCode()voidincreaseTotalFailedUnits()Increase the total failed unitsvoidincreaseTotalProcessedUnits()Increase the total processed unitsvoidincreaseTotalUnits()Increase the total unitsvoidinit(IProcessingProgress processingProgress)Initialize a previous statevoidsetProcessedUnits(long processedUnits)Sets the total processed unitsvoidsetProcessingStatusType(ProcessingStatusType processingStatusType)Sets the processing status typevoidsetStatusMessage(java.lang.String processingStatusMessage)Sets the processing status messagevoidsetTotalFailedUnits(long totalFailedUnits)Sets the total failed unitsvoidsetTotalUnits(long totalUnits)Sets the total unitsjava.lang.StringtoString()
-
-
-
Method Detail
-
init
public void init(IProcessingProgress processingProgress)
Initialize a previous state- Parameters:
processingProgress- the processing progress to initialize
-
getTotalUnits
public long getTotalUnits()
Description copied from interface:IProcessingProgressGets the number of total processed unit.- Specified by:
getTotalUnitsin interfaceIProcessingProgress- Returns:
- the total units.
- See Also:
IProcessingProgress.getTotalUnits()
-
setTotalUnits
public void setTotalUnits(long totalUnits)
Sets the total units- Parameters:
totalUnits- the total units
-
getProcessedUnits
public long getProcessedUnits()
Description copied from interface:IProcessingProgressGets the number of processed units.- Specified by:
getProcessedUnitsin interfaceIProcessingProgress- Returns:
- the number of processed units.
- See Also:
IProcessingProgress.getProcessedUnits()
-
setProcessedUnits
public void setProcessedUnits(long processedUnits)
Sets the total processed units- Parameters:
processedUnits- the total processed units
-
getTotalFailedUnits
public long getTotalFailedUnits()
Description copied from interface:IProcessingProgressGets the number of failed units.- Specified by:
getTotalFailedUnitsin interfaceIProcessingProgress- Returns:
- the number of failed units.
- See Also:
IProcessingProgress.getTotalFailedUnits()
-
setTotalFailedUnits
public void setTotalFailedUnits(long totalFailedUnits)
Sets the total failed units- Parameters:
totalFailedUnits- the total failed units
-
getProcesingStatistic
public IProcessingStatistic getProcesingStatistic()
Description copied from interface:IProcessingProgressThe processing statistic.- Specified by:
getProcesingStatisticin interfaceIProcessingProgress- Returns:
- the processing statistic.
- See Also:
IProcessingProgress.getProcesingStatistic()
-
getProcessingStatusType
public ProcessingStatusType getProcessingStatusType()
Description copied from interface:IProcessingProgressThe processing status type which covers the overall status- Specified by:
getProcessingStatusTypein interfaceIProcessingProgress- Returns:
- the processing status type.
- See Also:
IProcessingProgress.getProcessingStatusType()
-
setProcessingStatusType
public void setProcessingStatusType(ProcessingStatusType processingStatusType)
Sets the processing status type- Parameters:
processingStatusType- the processing status type
-
getProcessingStatusMessage
public java.lang.String getProcessingStatusMessage()
Description copied from interface:IProcessingProgressReturns the processing status message- Specified by:
getProcessingStatusMessagein interfaceIProcessingProgress- Returns:
- the processing status message
- See Also:
IProcessingProgress.getProcessingStatusMessage()
-
setStatusMessage
public void setStatusMessage(java.lang.String processingStatusMessage)
Sets the processing status message- Parameters:
processingStatusMessage- the processing status message
-
increaseTotalUnits
public void increaseTotalUnits()
Increase the total units
-
increaseTotalProcessedUnits
public void increaseTotalProcessedUnits()
Increase the total processed units
-
increaseTotalFailedUnits
public void increaseTotalFailedUnits()
Increase the total failed units
-
addStatistic
public void addStatistic(java.lang.String key, java.lang.Double value) throws java.lang.IllegalArgumentExceptionAdds a statistic value- Parameters:
key- the keyvalue- the value- Throws:
java.lang.IllegalArgumentException- In case of invalid key
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
-