Class WorkUnit


  • public final class WorkUnit
    extends Object
    A WorkUnit is a unit of work a worker will process. The idea is to replace fileNameList. Currently, WorkBundle is set to only have one file, and so there will only be one WorkUnit.
    • Method Detail

      • getFileName

        public String getFileName()
        Gets the filename for the WorkUnit
        Returns:
        the filename
      • setFilename

        public void setFilename​(String fileName)
        Sets the filename for the WorkUnit
        Parameters:
        fileName - the filename
      • getTransactionId

        public String getTransactionId()
        Gets the transaction Id of the WorkUnit
        Returns:
        the transaction Id
      • setTransactionId

        public void setTransactionId​(String transactionId)
        Sets the transaction id of the WorkUnit
        Parameters:
        transactionId - the transaction id to set
      • setFailedToParse

        public void setFailedToParse()
        Sets the WorkUnit as a failed to parse WorkUnit
      • failedToParse

        public boolean failedToParse()
        Gets the status of whether the WorkUnit failed to parse
        Returns:
        the boolean status of failed to parse
      • setFailedToProcess

        public void setFailedToProcess()
        Sets the status of whether the WorkUnit had an error in processing
      • failedToProcess

        public boolean failedToProcess()
        Gets the status of whether file had an error in processing.
        Returns:
        the boolean status of file process