Class ProcessingUnitPersistenceContainer
- java.lang.Object
-
- com.github.toolarium.processing.unit.runtime.runnable.ProcessingUnitPersistenceContainer
-
- All Implemented Interfaces:
java.io.Serializable
public class ProcessingUnitPersistenceContainer extends java.lang.Object implements java.io.SerializableImplements a processing persistence container.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProcessingUnitPersistenceContainer(java.lang.String id, java.lang.String name, java.lang.Class<? extends IProcessingUnit> processingUnitClass, java.util.List<Parameter> parameterList, IProcessingUnitPersistence processingPersistence, IProcessingUnitProgress processingUnitProgress, IProcessingUnitContext processingUnitContext, ProcessingRuntimeStatus processingRuntimeStatus, java.util.List<java.lang.String> processStatusMessageList, java.time.Instant startTimestamp, long duration, java.lang.Long maxNumberOfProcessingUnitCallsPerSecond, IEmptyProcessingUnitHandler emptyProcessingUnitHandler)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)longgetDuration()Get the duration in millisecondsIEmptyProcessingUnitHandlergetEmptyProcessingUnitHandler()Get the empty processing unit handlerjava.lang.StringgetId()Get the unique processing idjava.lang.LonggetMaxNumberOfProcessingUnitCallsPerSecond()Get the max number of processing unit calls per secondsjava.lang.StringgetName()Get the processing namejava.util.List<Parameter>getParameterList()Gets the parameter listIProcessingUnitPersistencegetProcessingPersistence()Gets the processing informationProcessingRuntimeStatusgetProcessingRuntimeStatus()Gets the process runtime statusjava.util.List<java.lang.String>getProcessingStatusMessageList()Gets the process status message listjava.lang.Class<? extends IProcessingUnit>getProcessingUnitClass()Get the processing unit classIProcessingUnitContextgetProcessingUnitContext()Gets the process unit contextIProcessingUnitProgressgetProcessingUnitProgress()Gets the processing unit progressjava.time.InstantgetStartTimestamp()Get the start time stampinthashCode()static byte[]toByteArray(ProcessingUnitPersistenceContainer processingPersistenceContainer)Convert the object into a byte arraystatic ProcessingUnitPersistenceContainertoProcessingPersistenceContainer(byte[] persistedState)Convert the object into a byte arrayjava.lang.StringtoString()
-
-
-
Constructor Detail
-
ProcessingUnitPersistenceContainer
public ProcessingUnitPersistenceContainer(java.lang.String id, java.lang.String name, java.lang.Class<? extends IProcessingUnit> processingUnitClass, java.util.List<Parameter> parameterList, IProcessingUnitPersistence processingPersistence, IProcessingUnitProgress processingUnitProgress, IProcessingUnitContext processingUnitContext, ProcessingRuntimeStatus processingRuntimeStatus, java.util.List<java.lang.String> processStatusMessageList, java.time.Instant startTimestamp, long duration, java.lang.Long maxNumberOfProcessingUnitCallsPerSecond, IEmptyProcessingUnitHandler emptyProcessingUnitHandler)Constructor- Parameters:
id- the unique id of the processingname- the name of the processingprocessingUnitClass- the processing unit classparameterList- the parameter listprocessingPersistence- the processing persistenceprocessingUnitProgress- the processing unit progressprocessingUnitContext- the processing context.processingRuntimeStatus- the process runtime statusprocessStatusMessageList- the process status message liststartTimestamp- the start time stampduration- the actual duration in millisecondsmaxNumberOfProcessingUnitCallsPerSecond- the max number of processing unit calls per secondsemptyProcessingUnitHandler- the empty processing unit handler
-
-
Method Detail
-
getId
public java.lang.String getId()
Get the unique processing id- Returns:
- the processing id
-
getName
public java.lang.String getName()
Get the processing name- Returns:
- the processing name
-
getProcessingUnitClass
public java.lang.Class<? extends IProcessingUnit> getProcessingUnitClass()
Get the processing unit class- Returns:
- the processing unit class
-
getParameterList
public java.util.List<Parameter> getParameterList()
Gets the parameter list- Returns:
- the parameter list
-
getProcessingPersistence
public IProcessingUnitPersistence getProcessingPersistence()
Gets the processing information- Returns:
- the processing information
-
getProcessingUnitProgress
public IProcessingUnitProgress getProcessingUnitProgress()
Gets the processing unit progress- Returns:
- the processing unit progress
-
getProcessingUnitContext
public IProcessingUnitContext getProcessingUnitContext()
Gets the process unit context- Returns:
- the process unit context
-
getProcessingRuntimeStatus
public ProcessingRuntimeStatus getProcessingRuntimeStatus()
Gets the process runtime status- Returns:
- the process runtime status
-
getProcessingStatusMessageList
public java.util.List<java.lang.String> getProcessingStatusMessageList()
Gets the process status message list- Returns:
- the process status message list
-
getStartTimestamp
public java.time.Instant getStartTimestamp()
Get the start time stamp- Returns:
- the start time stamp
-
getDuration
public long getDuration()
Get the duration in milliseconds- Returns:
- the duration
-
getMaxNumberOfProcessingUnitCallsPerSecond
public java.lang.Long getMaxNumberOfProcessingUnitCallsPerSecond()
Get the max number of processing unit calls per seconds- Returns:
- the max number of processing unit calls per seconds
-
getEmptyProcessingUnitHandler
public IEmptyProcessingUnitHandler getEmptyProcessingUnitHandler()
Get the empty processing unit handler- Returns:
- the empty pprocessing unit handler
-
toByteArray
public static byte[] toByteArray(ProcessingUnitPersistenceContainer processingPersistenceContainer) throws ProcessingException
Convert the object into a byte array- Parameters:
processingPersistenceContainer- the processing persistence container- Returns:
- the byte array to persist
- Throws:
ProcessingException- In case the processing container can't be serialized properly
-
toProcessingPersistenceContainer
public static ProcessingUnitPersistenceContainer toProcessingPersistenceContainer(byte[] persistedState) throws ProcessingException
Convert the object into a byte array- Parameters:
persistedState- the persisted state- Returns:
- the object representation
- Throws:
ProcessingException- In case the processing container can't be de-serialized properly
-
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()
-
-