Package PamController.fileprocessing
Class StoreChoiceSummary
java.lang.Object
PamController.fileprocessing.StoreChoiceSummary
Summary information about the data stores.
- Author:
- dg50
-
Constructor Summary
ConstructorDescriptionStoreChoiceSummary
(long outputEndTime, InputStoreInfo inputStoreInfo) StoreChoiceSummary
(InputStoreInfo inputInfo) StoreChoiceSummary
(InputStoreInfo info, ReprocessStoreChoice singleChoice) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChoice
(ReprocessStoreChoice choice) Add a reasonable choice to what the user can select to do.int
getFileIndexAfter
(Long inputEndTime) Get the index of the file that starts after the given time.int
getFileIndexBefore
(Long inputEndTime) Get the index of the file that starts before or exactly at the given time.getInputTimeForIndex
(int fileIndex) Get the start time in millis of a file for the given index.int
Get the number of choices.long
long
boolean
Is processing complete, i.e.void
setInputStoreInfo
(InputStoreInfo inputStoreInfo) void
setOutputEndTime
(long outputEndTime) void
setOutputStartTime
(long outputStartTime) 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.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.
-
Constructor Details
-
StoreChoiceSummary
-
StoreChoiceSummary
-
StoreChoiceSummary
-
-
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
Add a reasonable choice to what the user can select to do.- Parameters:
choice
-
-
getInputStartTime
- Returns:
- the start time of the first input file
-
getInputEndTime
- Returns:
- the start time of the first input file
-
getOutputEndTime
public long getOutputEndTime()- Returns:
- the outputEndTime
-
testOutputEndTime
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
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
- Returns:
- the inputStoreInfo
-
setInputStoreInfo
- Parameters:
inputStoreInfo
- the inputStoreInfo to set
-
getChoices
- Returns:
- the choices
-
getOutputStartTime
public long getOutputStartTime()- Returns:
- the outputStartTime
-
setOutputStartTime
public void setOutputStartTime(long outputStartTime) - Parameters:
outputStartTime
- the outputStartTime to set
-
getFileIndexBefore
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
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
Get the index of the file that starts after the given time.- Parameters:
inputEndTime
-- Returns:
- index of file, or -1 if none found.
-