Class ProcessingUnitStatusBuilder
- java.lang.Object
-
- com.github.toolarium.processing.unit.ProcessingUnitStatusBuilder
-
public class ProcessingUnitStatusBuilder extends java.lang.ObjectDefines the processing unit status builder
-
-
Constructor Summary
Constructors Constructor Description ProcessingUnitStatusBuilder()Constructor for ProcessingUnitStatusBuilderProcessingUnitStatusBuilder(ProcessingUnitProgress processingUnitProgress)Constructor for ProcessingUnitStatusBuilder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessingUnitStatusBuilderaddMessage(java.lang.String message)Processing add a messageProcessingUnitStatusBuilderaddMessageList(java.util.List<java.lang.String> messageList)Processing add messagesIProcessingUnitStatusbuild()Build the processing unit statusProcessingUnitStatusBuildererror(java.lang.String message)Processing has an error.ProcessingUnitStatusBuilderhasEnded()Mark there are no more units to processProcessingUnitStatusBuilderhasError()Processing has a warning.ProcessingUnitStatusBuilderhasMoreUnitsToProcess()Mark there are more units to processbooleanhasNext()Get the current hasNext attribute value back.ProcessingUnitStatusBuilderhasNext(boolean hasNext)Defines if there are more unit tor process.ProcessingUnitStatusBuilderhasNextIfHasUnprocessedUnits()Mark there are more units in case there are still unprocessed unitsProcessingUnitStatusBuilderhasWarning()Processing has warning.ProcessingUnitStatusBuilderincreaseNumberOfFailedUnits()Increase the number of failed processed units.ProcessingUnitStatusBuilderincreaseNumberOfFailedUnits(java.lang.Long numberOfFailedUnits)Increase the number of failed processed units.ProcessingUnitStatusBuilderincreaseNumberOfSuccessfulUnits()Increase the number of successful processed units.ProcessingUnitStatusBuilderincreaseNumberOfSuccessfulUnits(java.lang.Long numberOfSuccessfulUnits)Increase the number of successful processed units.ProcessingUnitStatusBuilderincreaseNumberOfUnprocessedUnits()Increase the number of unprocessed units.ProcessingUnitStatusBuilderincreaseNumberOfUnprocessedUnits(java.lang.Long numberOfUnprocessedUnits)Increase the number of unprocessed units.ProcessingUnitStatusBuildersetNumberOfFailedUnits(java.lang.Long numberOfFailedUnits)Set the number of failed processed units.ProcessingUnitStatusBuildersetNumberOfSuccessfulUnits(java.lang.Long numberOfSuccessfulUnits)Set the number of successful processed units.ProcessingUnitStatusBuildersetNumberOfUnprocessedUnits(java.lang.Long numberOfUnprocessedUnits)Set optionally the number of unprocessed unitsProcessingUnitStatusBuilderstatistic(java.lang.String key, com.github.toolarium.common.statistic.StatisticCounter statisticCounter)Add a statistic valueProcessingUnitStatusBuilderstatistic(java.lang.String key, java.lang.Double value)Add a statistic valueProcessingUnitStatusBuilderstatistic(java.lang.String key, java.lang.Long value)Add a statistic valuejava.lang.StringtoString()ProcessingUnitStatusBuilderwarn(java.lang.String message)Processing has a warning.
-
-
-
Constructor Detail
-
ProcessingUnitStatusBuilder
public ProcessingUnitStatusBuilder()
Constructor for ProcessingUnitStatusBuilder
-
ProcessingUnitStatusBuilder
public ProcessingUnitStatusBuilder(ProcessingUnitProgress processingUnitProgress)
Constructor for ProcessingUnitStatusBuilder- Parameters:
processingUnitProgress- the processing unit progress
-
-
Method Detail
-
hasNext
public boolean hasNext()
Get the current hasNext attribute value back.- Returns:
- true if it has more element; otherwise it has ended.
-
hasNext
public ProcessingUnitStatusBuilder hasNext(boolean hasNext)
Defines if there are more unit tor process.- Parameters:
hasNext- true if there are more units to process; otherwise false- Returns:
- this instance
-
hasNextIfHasUnprocessedUnits
public ProcessingUnitStatusBuilder hasNextIfHasUnprocessedUnits()
Mark there are more units in case there are still unprocessed units- Returns:
- this instance
-
hasMoreUnitsToProcess
public ProcessingUnitStatusBuilder hasMoreUnitsToProcess()
Mark there are more units to process- Returns:
- this instance
-
hasEnded
public ProcessingUnitStatusBuilder hasEnded()
Mark there are no more units to process- Returns:
- this instance
-
increaseNumberOfSuccessfulUnits
public ProcessingUnitStatusBuilder increaseNumberOfSuccessfulUnits()
Increase the number of successful processed units.- Returns:
- this instance
-
increaseNumberOfSuccessfulUnits
public ProcessingUnitStatusBuilder increaseNumberOfSuccessfulUnits(java.lang.Long numberOfSuccessfulUnits)
Increase the number of successful processed units.- Parameters:
numberOfSuccessfulUnits- the number of successful units to add- Returns:
- this instance
-
setNumberOfSuccessfulUnits
public ProcessingUnitStatusBuilder setNumberOfSuccessfulUnits(java.lang.Long numberOfSuccessfulUnits)
Set the number of successful processed units.- Parameters:
numberOfSuccessfulUnits- the number of successful processed units to set- Returns:
- this instance
-
increaseNumberOfFailedUnits
public ProcessingUnitStatusBuilder increaseNumberOfFailedUnits()
Increase the number of failed processed units.- Returns:
- this instance
-
increaseNumberOfFailedUnits
public ProcessingUnitStatusBuilder increaseNumberOfFailedUnits(java.lang.Long numberOfFailedUnits)
Increase the number of failed processed units.- Parameters:
numberOfFailedUnits- the number of failed units to add- Returns:
- this instance
-
setNumberOfFailedUnits
public ProcessingUnitStatusBuilder setNumberOfFailedUnits(java.lang.Long numberOfFailedUnits)
Set the number of failed processed units.- Parameters:
numberOfFailedUnits- the number of failed processed units to set- Returns:
- this instance
-
increaseNumberOfUnprocessedUnits
public ProcessingUnitStatusBuilder increaseNumberOfUnprocessedUnits()
Increase the number of unprocessed units.- Returns:
- this instance
-
increaseNumberOfUnprocessedUnits
public ProcessingUnitStatusBuilder increaseNumberOfUnprocessedUnits(java.lang.Long numberOfUnprocessedUnits)
Increase the number of unprocessed units.- Parameters:
numberOfUnprocessedUnits- the number of unprocessed units to add- Returns:
- this instance
-
setNumberOfUnprocessedUnits
public ProcessingUnitStatusBuilder setNumberOfUnprocessedUnits(java.lang.Long numberOfUnprocessedUnits)
Set optionally the number of unprocessed units- Parameters:
numberOfUnprocessedUnits- the number of unprocessed units- Returns:
- this instance
-
hasWarning
public ProcessingUnitStatusBuilder hasWarning()
Processing has warning.- Returns:
- this instance
-
warn
public ProcessingUnitStatusBuilder warn(java.lang.String message)
Processing has a warning.- Parameters:
message- the message- Returns:
- this instance
-
hasError
public ProcessingUnitStatusBuilder hasError()
Processing has a warning.- Returns:
- this instance
-
error
public ProcessingUnitStatusBuilder error(java.lang.String message)
Processing has an error.- Parameters:
message- the message- Returns:
- this instance
-
addMessage
public ProcessingUnitStatusBuilder addMessage(java.lang.String message)
Processing add a message- Parameters:
message- the message to add- Returns:
- this instance
-
addMessageList
public ProcessingUnitStatusBuilder addMessageList(java.util.List<java.lang.String> messageList)
Processing add messages- Parameters:
messageList- the messages to add- Returns:
- this instance
-
statistic
public ProcessingUnitStatusBuilder statistic(java.lang.String key, java.lang.Long value)
Add a statistic value- Parameters:
key- the statistic keyvalue- the value to add- Returns:
- this instance
-
statistic
public ProcessingUnitStatusBuilder statistic(java.lang.String key, java.lang.Double value)
Add a statistic value- Parameters:
key- the statistic keyvalue- the value to add- Returns:
- this instance
-
statistic
public ProcessingUnitStatusBuilder statistic(java.lang.String key, com.github.toolarium.common.statistic.StatisticCounter statisticCounter)
Add a statistic value- Parameters:
key- the statistic keystatisticCounter- the statistic counter to add- Returns:
- this instance
-
build
public IProcessingUnitStatus build()
Build the processing unit status- Returns:
- the processing unit status
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
-