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)longgetNumberOfFailedUnits()Gets the number of failed units.longgetNumberOfProcessedUnits()Gets the number of processed units (failed units included).longgetNumberOfSuccessfulUnits()Gets the number of successful units.longgetNumberOfUnitsToProcess()Get the number of units to process in total.longgetNumberOfUnprocessedUnits()Get the number of unprocessed units.IProcessingStatisticgetProcesingStatistic()The processing statistic.ProcessingRuntimeStatusgetProcessingRuntimeStatus()The processing runtime status which covers the overall statusjava.lang.StringgetProcessingStatusMessage()Returns the current processing status messageinthashCode()voidincreaseNumberOfFailedUnits()Increase the number of failed unitsvoidincreaseNumberOfProcessedUnits()Increase the number of processed unitsvoidincreaseTotalUnits()Increase the total unitsvoidinit(IProcessingProgress processingProgress)Initialize a previous statevoidresetProcessingStatusMessage()Reset the processing status message.voidsetNumberOfFailedUnits(long numberOfFailedUnits)Sets the number of failed unitsvoidsetNumberOfProcessedUnits(long processedUnits)Sets the number of processed unitsvoidsetNumberOfUnitsToProcess(long numberOfUnitsToProcess)Sets the number of units to process in totalvoidsetProcessingRuntimeStatus(ProcessingRuntimeStatus processingRuntimeStatus)Sets the processing status typevoidsetStatusMessage(java.lang.String processingStatusMessage)Sets the processing status messagejava.lang.StringtoString()
-
-
-
Method Detail
-
init
public void init(IProcessingProgress processingProgress)
Initialize a previous state- Parameters:
processingProgress- the processing progress to initialize
-
getNumberOfUnitsToProcess
public long getNumberOfUnitsToProcess()
Description copied from interface:IProcessingProgressGet the number of units to process in total.- Specified by:
getNumberOfUnitsToProcessin interfaceIProcessingProgress- Returns:
- the number of units to process in total.
- See Also:
IProcessingProgress.getNumberOfUnitsToProcess()
-
setNumberOfUnitsToProcess
public void setNumberOfUnitsToProcess(long numberOfUnitsToProcess)
Sets the number of units to process in total- Parameters:
numberOfUnitsToProcess- the number of units to process in total
-
getNumberOfUnprocessedUnits
public long getNumberOfUnprocessedUnits()
Description copied from interface:IProcessingProgressGet the number of unprocessed units.- Specified by:
getNumberOfUnprocessedUnitsin interfaceIProcessingProgress- Returns:
- the number of unprocessed units.
- See Also:
IProcessingProgress.getNumberOfUnprocessedUnits()
-
getNumberOfProcessedUnits
public long getNumberOfProcessedUnits()
Description copied from interface:IProcessingProgressGets the number of processed units (failed units included).- Specified by:
getNumberOfProcessedUnitsin interfaceIProcessingProgress- Returns:
- the number of processed units (failed units included).
- See Also:
IProcessingProgress.getNumberOfProcessedUnits()
-
setNumberOfProcessedUnits
public void setNumberOfProcessedUnits(long processedUnits)
Sets the number of processed units- Parameters:
processedUnits- the number of processed units
-
getNumberOfSuccessfulUnits
public long getNumberOfSuccessfulUnits()
Description copied from interface:IProcessingProgressGets the number of successful units.- Specified by:
getNumberOfSuccessfulUnitsin interfaceIProcessingProgress- Returns:
- the number of successful units.
- See Also:
IProcessingProgress.getNumberOfSuccessfulUnits()
-
getNumberOfFailedUnits
public long getNumberOfFailedUnits()
Description copied from interface:IProcessingProgressGets the number of failed units.- Specified by:
getNumberOfFailedUnitsin interfaceIProcessingProgress- Returns:
- the number of failed units.
- See Also:
IProcessingProgress.getNumberOfFailedUnits()
-
setNumberOfFailedUnits
public void setNumberOfFailedUnits(long numberOfFailedUnits)
Sets the number of failed units- Parameters:
numberOfFailedUnits- the number of 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()
-
getProcessingRuntimeStatus
public ProcessingRuntimeStatus getProcessingRuntimeStatus()
Description copied from interface:IProcessingProgressThe processing runtime status which covers the overall status- Specified by:
getProcessingRuntimeStatusin interfaceIProcessingProgress- Returns:
- the processing status type.
- See Also:
IProcessingProgress.getProcessingRuntimeStatus()
-
setProcessingRuntimeStatus
public void setProcessingRuntimeStatus(ProcessingRuntimeStatus processingRuntimeStatus)
Sets the processing status type- Parameters:
processingRuntimeStatus- the processing runtime status
-
getProcessingStatusMessage
public java.lang.String getProcessingStatusMessage()
Description copied from interface:IProcessingProgressReturns the current processing status message- Specified by:
getProcessingStatusMessagein interfaceIProcessingProgress- Returns:
- the current processing status message
- See Also:
IProcessingProgress.getProcessingStatusMessage()
-
resetProcessingStatusMessage
public void resetProcessingStatusMessage()
Description copied from interface:IProcessingProgressReset the processing status message. This will be called before the processUnit call- Specified by:
resetProcessingStatusMessagein interfaceIProcessingProgress- See Also:
IProcessingProgress.resetProcessingStatusMessage()
-
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
-
increaseNumberOfProcessedUnits
public void increaseNumberOfProcessedUnits()
Increase the number of processed units
-
increaseNumberOfFailedUnits
public void increaseNumberOfFailedUnits()
Increase the number of 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()
-
-