Class ProcessingUnitPersistenceContainer

  • All Implemented Interfaces:
    java.io.Serializable

    public class ProcessingUnitPersistenceContainer
    extends java.lang.Object
    implements java.io.Serializable
    Implements a processing persistence container.
    See Also:
    Serialized Form
    • 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)
        Constructor
        Parameters:
        id - the unique id of the processing
        name - the name of the processing
        processingUnitClass - the processing unit class
        parameterList - the parameter list
        processingPersistence - the processing persistence
        processingUnitProgress - the processing unit progress
        processingUnitContext - the processing context.
        processingRuntimeStatus - the process runtime status
        processStatusMessageList - the process status message list
        startTimestamp - the start time stamp
        duration - the actual duration in milliseconds
        maxNumberOfProcessingUnitCallsPerSecond - the max number of processing unit calls per seconds
    • 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
      • 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:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)