Class ProcessingUnitStatus
- java.lang.Object
-
- com.github.toolarium.processing.unit.runtime.ProcessingUnitStatus
-
- All Implemented Interfaces:
IProcessingUnitStatus,java.io.Serializable
public class ProcessingUnitStatus extends java.lang.Object implements IProcessingUnitStatus, java.io.Serializable
Implements theIProcessingUnitStatus.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProcessingUnitStatus()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.github.toolarium.common.statistic.StatisticCounteraddStatistic(java.lang.String key, com.github.toolarium.common.statistic.StatisticCounter inputStatisticCounter)Add statisticcom.github.toolarium.common.statistic.StatisticCounteraddStatistic(java.lang.String key, java.lang.Double value)Add statisticcom.github.toolarium.common.statistic.StatisticCounteraddStatistic(java.lang.String key, java.lang.Long value)Add statisticProcessingUnitStatusaddStatusMessage(java.lang.String statusMessage)Sets the status message listbooleanequals(java.lang.Object obj)java.lang.LonggetNumberOfFailedUnits()Gets the number of failed units processed that were failed in the last run.java.lang.LonggetNumberOfSuccessfulUnits()Gets the number of successful units that were processed in the last run.java.lang.LonggetNumberOfUnprocessedUnits()Optionally, the number of all unprocessed units can be returned.ProcessingRuntimeStatusgetProcessingRuntimeStatus()The processing runtime status for this run.ProcessingUnitStatisticgetProcessingUnitStatistic()Get the processing unit statistic of the last call.com.github.toolarium.common.statistic.StatisticCountergetStatisticCounter(java.lang.String key)Get statistic counterjava.util.List<java.lang.String>getStatusMessageList()A return message can be passed back.inthashCode()ProcessingUnitStatushasMoreUnitsToProcess()Mark there are more units to processbooleanhasNext()Defines if there is more to process or not.ProcessingUnitStatusincreaseNumberOfFailedUnits()Increase the number of failed unitsProcessingUnitStatusincreaseNumberOfFailedUnits(java.lang.Long numberOfFailedUnits)Increase the number of failed unitsProcessingUnitStatusincreaseNumberOfSuccessfulUnits()Increase the number of successful processed unitsProcessingUnitStatusincreaseNumberOfSuccessfulUnits(java.lang.Long numberOfSuccessfulUnits)Increase the number of successful processed unitsProcessingUnitStatusincreaseNumberOfUnprocessedUnits()Increase the number of unprocessed unitsProcessingUnitStatusincreaseNumberOfUnprocessedUnits(java.lang.Long numberOfUnprocessedUnits)Increase the number of unprocessed unitsProcessingUnitStatussetHasNext(boolean hasNext)Set has nextProcessingUnitStatussetNumberOfFailedUnits(java.lang.Long numberOfFailedUnits)Set the number of failed unitsProcessingUnitStatussetNumberOfSuccessfulUnits(java.lang.Long numberOfSuccessfulUnits)Set the number of successful processed unitsProcessingUnitStatussetNumberOfUnprocessedUnits(java.lang.Long numberOfUnprocessedUnits)Set the number of unprocessed unitsProcessingUnitStatussetProcessingRuntimeStatus(ProcessingRuntimeStatus processingRuntimeStatus)Set the processing runtime statisProcessingUnitStatussetStatusMessageList(java.util.List<java.lang.String> statusMessageList)Sets the status message listjava.lang.StringtoString()
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
Description copied from interface:IProcessingUnitStatusDefines if there is more to process or not.- Specified by:
hasNextin interfaceIProcessingUnitStatus- Returns:
- true if it has more element; otherwise it has ended.
- See Also:
IProcessingUnitStatus.hasNext()
-
hasMoreUnitsToProcess
public ProcessingUnitStatus hasMoreUnitsToProcess()
Mark there are more units to process- Returns:
- this instance
-
setHasNext
public ProcessingUnitStatus setHasNext(boolean hasNext)
Set has next- Parameters:
hasNext- true if it has more to process.- Returns:
- this instance
-
getNumberOfSuccessfulUnits
public java.lang.Long getNumberOfSuccessfulUnits()
Description copied from interface:IProcessingUnitStatusGets the number of successful units that were processed in the last run.- Specified by:
getNumberOfSuccessfulUnitsin interfaceIProcessingUnitStatus- Returns:
- the number of successful units or null.
- See Also:
IProcessingUnitStatus.getNumberOfSuccessfulUnits()
-
setNumberOfSuccessfulUnits
public ProcessingUnitStatus setNumberOfSuccessfulUnits(java.lang.Long numberOfSuccessfulUnits)
Set the number of successful processed units- Parameters:
numberOfSuccessfulUnits- the number of successful processed units- Returns:
- this instance
-
increaseNumberOfSuccessfulUnits
public ProcessingUnitStatus increaseNumberOfSuccessfulUnits()
Increase the number of successful processed units- Returns:
- this instance
-
increaseNumberOfSuccessfulUnits
public ProcessingUnitStatus increaseNumberOfSuccessfulUnits(java.lang.Long numberOfSuccessfulUnits)
Increase the number of successful processed units- Parameters:
numberOfSuccessfulUnits- the number of successful units to add- Returns:
- this instance
-
getNumberOfFailedUnits
public java.lang.Long getNumberOfFailedUnits()
Description copied from interface:IProcessingUnitStatusGets the number of failed units processed that were failed in the last run.- Specified by:
getNumberOfFailedUnitsin interfaceIProcessingUnitStatus- Returns:
- the number of failed units or null.
- See Also:
IProcessingUnitStatus.getNumberOfFailedUnits()
-
setNumberOfFailedUnits
public ProcessingUnitStatus setNumberOfFailedUnits(java.lang.Long numberOfFailedUnits)
Set the number of failed units- Parameters:
numberOfFailedUnits- the number of failed units- Returns:
- this instance
-
increaseNumberOfFailedUnits
public ProcessingUnitStatus increaseNumberOfFailedUnits()
Increase the number of failed units- Returns:
- this instance
-
increaseNumberOfFailedUnits
public ProcessingUnitStatus increaseNumberOfFailedUnits(java.lang.Long numberOfFailedUnits)
Increase the number of failed units- Parameters:
numberOfFailedUnits- the number of failed units to add- Returns:
- this instance
-
getNumberOfUnprocessedUnits
public java.lang.Long getNumberOfUnprocessedUnits()
Description copied from interface:IProcessingUnitStatusOptionally, the number of all unprocessed units can be returned.- Specified by:
getNumberOfUnprocessedUnitsin interfaceIProcessingUnitStatus- Returns:
- the number of unprocessed units.
- See Also:
IProcessingUnitStatus.getNumberOfFailedUnits()
-
setNumberOfUnprocessedUnits
public ProcessingUnitStatus setNumberOfUnprocessedUnits(java.lang.Long numberOfUnprocessedUnits)
Set the number of unprocessed units- Parameters:
numberOfUnprocessedUnits- the number of unprocessed units- Returns:
- this instance
-
increaseNumberOfUnprocessedUnits
public ProcessingUnitStatus increaseNumberOfUnprocessedUnits()
Increase the number of unprocessed units- Returns:
- this instance
-
increaseNumberOfUnprocessedUnits
public ProcessingUnitStatus increaseNumberOfUnprocessedUnits(java.lang.Long numberOfUnprocessedUnits)
Increase the number of unprocessed units- Parameters:
numberOfUnprocessedUnits- the number of unprocessed units to add- Returns:
- this instance
-
getProcessingRuntimeStatus
public ProcessingRuntimeStatus getProcessingRuntimeStatus()
Description copied from interface:IProcessingUnitStatusThe processing runtime status for this run. If it's null then it will be interpreted as successful in the last run.- Specified by:
getProcessingRuntimeStatusin interfaceIProcessingUnitStatus- Returns:
- the processing runtime status or null
- See Also:
IProcessingUnitStatus.getProcessingRuntimeStatus()
-
setProcessingRuntimeStatus
public ProcessingUnitStatus setProcessingRuntimeStatus(ProcessingRuntimeStatus processingRuntimeStatus)
Set the processing runtime statis- Parameters:
processingRuntimeStatus- the processing runtime statis- Returns:
- this instance
-
getStatusMessageList
public java.util.List<java.lang.String> getStatusMessageList()
Description copied from interface:IProcessingUnitStatusA return message can be passed back. In case it's null then no status message is available in the last run.- Specified by:
getStatusMessageListin interfaceIProcessingUnitStatus- Returns:
- the status message list or null
- See Also:
IProcessingUnitStatus.getStatusMessageList()
-
setStatusMessageList
public ProcessingUnitStatus setStatusMessageList(java.util.List<java.lang.String> statusMessageList)
Sets the status message list- Parameters:
statusMessageList- the status message list- Returns:
- this instance
-
addStatusMessage
public ProcessingUnitStatus addStatusMessage(java.lang.String statusMessage)
Sets the status message list- Parameters:
statusMessage- the status message- Returns:
- this instance
-
getProcessingUnitStatistic
public ProcessingUnitStatistic getProcessingUnitStatistic()
Description copied from interface:IProcessingUnitStatusGet the processing unit statistic of the last call.- Specified by:
getProcessingUnitStatisticin interfaceIProcessingUnitStatus- Returns:
- the processing unit statistic of last call or null.
- See Also:
IProcessingUnitStatus.getProcessingUnitStatistic()
-
addStatistic
public com.github.toolarium.common.statistic.StatisticCounter addStatistic(java.lang.String key, java.lang.Long value)Add statistic- Parameters:
key- the key / name of the statisticvalue- the value to add- Returns:
- the statistic counter
-
addStatistic
public com.github.toolarium.common.statistic.StatisticCounter addStatistic(java.lang.String key, java.lang.Double value)Add statistic- Parameters:
key- the key / name of the statisticvalue- the value to add- Returns:
- the statistic counter
-
addStatistic
public com.github.toolarium.common.statistic.StatisticCounter addStatistic(java.lang.String key, com.github.toolarium.common.statistic.StatisticCounter inputStatisticCounter)Add statistic- Parameters:
key- the key / name of the statisticinputStatisticCounter- statistic counter- Returns:
- the statistic counter
-
getStatisticCounter
public com.github.toolarium.common.statistic.StatisticCounter getStatisticCounter(java.lang.String key)
Get statistic counter- Parameters:
key- the key / name of the statistic- Returns:
- the statistic counter
-
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()
-
-