Class StoreChoiceSummary

java.lang.Object
PamController.fileprocessing.StoreChoiceSummary

public class StoreChoiceSummary extends Object
Summary information about the data stores.
Author:
dg50
  • Constructor Details

  • Method Details

    • getNumChoices

      public int getNumChoices()
      Get the number of choices. If it's only one, then there isn't a lot to do. If it's >1, then need a decision in the form of a command line instruction or a user dialog.
      Returns:
      number of choices.
    • isProcessingComplete

      public boolean isProcessingComplete()
      Is processing complete, i.e. last time in output matches last time in input data.
      Returns:
      true if processing appears to be complete.
    • addChoice

      public void addChoice(ReprocessStoreChoice choice)
      Add a reasonable choice to what the user can select to do.
      Parameters:
      choice -
    • getInputStartTime

      public Long getInputStartTime()
      Returns:
      the start time of the first input file
    • getInputEndTime

      public Long getInputEndTime()
      Returns:
      the start time of the first input file
    • getOutputEndTime

      public long getOutputEndTime()
      Returns:
      the outputEndTime
    • testOutputEndTime

      public long testOutputEndTime(Long lastDataTime)
      Set the last data time, but only if the passed value is not null and is bigger than the current value.
      Parameters:
      lastDataTime -
      Returns:
      largest of current and passed value.
    • testOutputStartTime

      public long testOutputStartTime(Long firstDataTime)
      Set the last data time, but only if the passed value is not null and is bigger than the current value.
      Parameters:
      lastDataTime -
      Returns:
      largest of current and passed value.
    • setOutputEndTime

      public void setOutputEndTime(long outputEndTime)
      Parameters:
      outputEndTime - the outputEndTime to set
    • getInputStoreInfo

      public InputStoreInfo getInputStoreInfo()
      Returns:
      the inputStoreInfo
    • setInputStoreInfo

      public void setInputStoreInfo(InputStoreInfo inputStoreInfo)
      Parameters:
      inputStoreInfo - the inputStoreInfo to set
    • getChoices

      public List<ReprocessStoreChoice> getChoices()
      Returns:
      the choices
    • getOutputStartTime

      public long getOutputStartTime()
      Returns:
      the outputStartTime
    • setOutputStartTime

      public void setOutputStartTime(long outputStartTime)
      Parameters:
      outputStartTime - the outputStartTime to set
    • getFileIndexBefore

      public int getFileIndexBefore(Long inputEndTime)
      Get the index of the file that starts before or exactly at the given time.
      Parameters:
      inputEndTime -
      Returns:
      index of file, or -1 if none found.
    • getInputTimeForIndex

      public Long getInputTimeForIndex(int fileIndex)
      Get the start time in millis of a file for the given index.
      Parameters:
      fileIndex -
      Returns:
      file time, or null if no file available.
    • getFileIndexAfter

      public int getFileIndexAfter(Long inputEndTime)
      Get the index of the file that starts after the given time.
      Parameters:
      inputEndTime -
      Returns:
      index of file, or -1 if none found.