Class ProcessingUnitProgress
- java.lang.Object
-
- com.github.toolarium.processing.unit.runtime.ProcessingUnitProgress
-
- All Implemented Interfaces:
IProcessingUnitProgress,IProcessingUnitUpdateProgress,java.io.Serializable
public class ProcessingUnitProgress extends java.lang.Object implements IProcessingUnitUpdateProgress, java.io.Serializable
Implements theIProcessingUnitProgress.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProcessingUnitProgress()ConstructorProcessingUnitProgress(IProcessingUnitProgress processingProgress)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProcessingUnitStatistic(IProcessingUnitStatistic processingUnitStatistic)Add a processing unit statisticlongaddProcessingUnitStatus(IProcessingUnitStatus processingUnitStatus)Add the processing unit statusProcessingUnitProgressdecreaseNumberOfUnitsToProcess(long numberOfUnitsToProcess)Increase the number of units to process in totalbooleanequals(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.ProcessingRuntimeStatusgetProcessingRuntimeStatus()The overall processing runtime status.IProcessingUnitStatisticgetProcessingUnitStatistic()Get the processing unit statisticintgetProgress()Get the progress in percentageinthashCode()ProcessingUnitProgressincreaseNumberOfFailedUnits()Increase the number of failed unitsProcessingUnitProgressincreaseNumberOfFailedUnits(long numberOfFailedUnits)Increase the number of failed unitsProcessingUnitProgressincreaseNumberOfProcessedUnits()Increase the number of processed unitsProcessingUnitProgressincreaseNumberOfProcessedUnits(long processedUnits)Increase the number of processed unitsProcessingUnitProgressincreaseNumberOfUnitsToProcess(long numberOfUnitsToProcess)Increase the number of units to process in totalProcessingUnitProgressincreaseTotalUnits()Increase the total unitsProcessingUnitProgresssetNumberOfFailedUnits(long numberOfFailedUnits)Sets the number of failed unitsProcessingUnitProgresssetNumberOfProcessedUnits(long processedUnits)Sets the number of processed unitslongsetNumberOfUnitsToProcess(long numberOfUnitsToProcess)Sets the number of units to process in totalProcessingUnitProgresssetProcessingRuntimeStatus(ProcessingRuntimeStatus processingRuntimeStatus)Sets the processing status typejava.lang.StringtoString()ProcessingUnitProgressupdateProcessingRuntimeStatus(ProcessingRuntimeStatus processingRuntimeStatus)Update processing runtime status
-
-
-
Constructor Detail
-
ProcessingUnitProgress
public ProcessingUnitProgress()
Constructor
-
ProcessingUnitProgress
public ProcessingUnitProgress(IProcessingUnitProgress processingProgress)
Constructor- Parameters:
processingProgress- the processing progress to initialize
-
-
Method Detail
-
addProcessingUnitStatus
public long addProcessingUnitStatus(IProcessingUnitStatus processingUnitStatus)
Add the processing unit status- Parameters:
processingUnitStatus- the processing unit status to add- Returns:
- the number of processed units
-
getNumberOfUnitsToProcess
public long getNumberOfUnitsToProcess()
Description copied from interface:IProcessingUnitProgressGet the number of units to process in total.- Specified by:
getNumberOfUnitsToProcessin interfaceIProcessingUnitProgress- Returns:
- the number of units to process in total.
- See Also:
IProcessingUnitProgress.getNumberOfUnitsToProcess()
-
increaseNumberOfUnitsToProcess
public ProcessingUnitProgress increaseNumberOfUnitsToProcess(long numberOfUnitsToProcess)
Increase the number of units to process in total- Parameters:
numberOfUnitsToProcess- the number of units to process in total- Returns:
- this instance
-
decreaseNumberOfUnitsToProcess
public ProcessingUnitProgress decreaseNumberOfUnitsToProcess(long numberOfUnitsToProcess)
Increase the number of units to process in total- Parameters:
numberOfUnitsToProcess- the number of units to process in total- Returns:
- this instance
-
setNumberOfUnitsToProcess
public long setNumberOfUnitsToProcess(long numberOfUnitsToProcess)
Description copied from interface:IProcessingUnitUpdateProgressSets the number of units to process in total- Specified by:
setNumberOfUnitsToProcessin interfaceIProcessingUnitUpdateProgress- Parameters:
numberOfUnitsToProcess- the number of units to process in total- Returns:
- the number of set units to process
- See Also:
IProcessingUnitUpdateProgress.setNumberOfUnitsToProcess(long)
-
getNumberOfUnprocessedUnits
public long getNumberOfUnprocessedUnits()
Description copied from interface:IProcessingUnitProgressGet the number of unprocessed units. It's calculated by the number of units to process minus the number of processed units.- Specified by:
getNumberOfUnprocessedUnitsin interfaceIProcessingUnitProgress- Returns:
- the number of unprocessed units.
- See Also:
IProcessingUnitProgress.getNumberOfUnprocessedUnits()
-
getNumberOfProcessedUnits
public long getNumberOfProcessedUnits()
Description copied from interface:IProcessingUnitProgressGets the number of processed units (failed units included).- Specified by:
getNumberOfProcessedUnitsin interfaceIProcessingUnitProgress- Returns:
- the number of processed units (failed units included).
- See Also:
IProcessingUnitProgress.getNumberOfProcessedUnits()
-
increaseNumberOfProcessedUnits
public ProcessingUnitProgress increaseNumberOfProcessedUnits()
Increase the number of processed units- Returns:
- this instance
-
increaseNumberOfProcessedUnits
public ProcessingUnitProgress increaseNumberOfProcessedUnits(long processedUnits)
Increase the number of processed units- Parameters:
processedUnits- the number of processed units- Returns:
- this instance
-
setNumberOfProcessedUnits
public ProcessingUnitProgress setNumberOfProcessedUnits(long processedUnits)
Sets the number of processed units- Parameters:
processedUnits- the number of processed units- Returns:
- this instance
-
getNumberOfSuccessfulUnits
public long getNumberOfSuccessfulUnits()
Description copied from interface:IProcessingUnitProgressGets the number of successful units. It's calculated by the number of units to process minus the failed units.- Specified by:
getNumberOfSuccessfulUnitsin interfaceIProcessingUnitProgress- Returns:
- the number of successful units.
- See Also:
IProcessingUnitProgress.getNumberOfSuccessfulUnits()
-
getNumberOfFailedUnits
public long getNumberOfFailedUnits()
Description copied from interface:IProcessingUnitProgressGets the number of failed units.- Specified by:
getNumberOfFailedUnitsin interfaceIProcessingUnitProgress- Returns:
- the number of failed units.
- See Also:
IProcessingUnitProgress.getNumberOfFailedUnits()
-
increaseNumberOfFailedUnits
public ProcessingUnitProgress increaseNumberOfFailedUnits()
Increase the number of failed units- Returns:
- this instance
-
increaseNumberOfFailedUnits
public ProcessingUnitProgress increaseNumberOfFailedUnits(long numberOfFailedUnits)
Increase the number of failed units- Parameters:
numberOfFailedUnits- the number of failed units- Returns:
- this instance
-
setNumberOfFailedUnits
public ProcessingUnitProgress setNumberOfFailedUnits(long numberOfFailedUnits)
Sets the number of failed units- Parameters:
numberOfFailedUnits- the number of failed units- Returns:
- this instance
-
getProcessingRuntimeStatus
public ProcessingRuntimeStatus getProcessingRuntimeStatus()
Description copied from interface:IProcessingUnitProgressThe overall processing runtime status.- Specified by:
getProcessingRuntimeStatusin interfaceIProcessingUnitProgress- Returns:
- the processing status type.
- See Also:
IProcessingUnitProgress.getProcessingRuntimeStatus()
-
setProcessingRuntimeStatus
public ProcessingUnitProgress setProcessingRuntimeStatus(ProcessingRuntimeStatus processingRuntimeStatus)
Sets the processing status type- Parameters:
processingRuntimeStatus- the processing runtime status- Returns:
- this instance
-
updateProcessingRuntimeStatus
public ProcessingUnitProgress updateProcessingRuntimeStatus(ProcessingRuntimeStatus processingRuntimeStatus)
Update processing runtime status- Parameters:
processingRuntimeStatus- the processing runtime status- Returns:
- the instance
-
increaseTotalUnits
public ProcessingUnitProgress increaseTotalUnits()
Increase the total units- Returns:
- this instance
-
getProcessingUnitStatistic
public IProcessingUnitStatistic getProcessingUnitStatistic()
Description copied from interface:IProcessingUnitProgressGet the processing unit statistic- Specified by:
getProcessingUnitStatisticin interfaceIProcessingUnitProgress- Returns:
- the processing unit statistic
- See Also:
IProcessingUnitProgress.getProcessingUnitStatistic()
-
addProcessingUnitStatistic
public void addProcessingUnitStatistic(IProcessingUnitStatistic processingUnitStatistic)
Add a processing unit statistic- Parameters:
processingUnitStatistic- the processing unit statistic to add
-
getProgress
public int getProgress()
Description copied from interface:IProcessingUnitProgressGet the progress in percentage- Specified by:
getProgressin interfaceIProcessingUnitProgress- Returns:
- the progress
- See Also:
IProcessingUnitProgress.getProgress()
-
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()
-
-