public class RunningJobsInfoDBDAO extends RunningJobsInfoDAO
Constructor and Description |
---|
RunningJobsInfoDBDAO()
The constructor of RunningJobsInfoDBDAO.
|
Modifier and Type | Method and Description |
---|---|
int |
deleteFrontierReports(long jobId)
Deletes all frontier report data pertaining to the given job id from the persistent storage.
|
InMemoryFrontierReport |
getFrontierReport(long jobId,
String filterId)
Retrieve a frontier report from a job id and a given filter class.
|
String[] |
getFrontierReportFilterTypes()
Returns the list of the available frontier report types.
|
StartedJobInfo[] |
getFullJobHistory(long jobId)
Returns an array of all progress records chronologically sorted for the given job ID.
|
Set<Long> |
getHistoryRecordIds()
Returns the ids of jobs for which history records exist as an immutable set.
|
Map<String,List<StartedJobInfo>> |
getMostRecentByHarvestName()
Returns the most recent record for every job, partitioned by harvest definition name.
|
StartedJobInfo |
getMostRecentByJobId(long jobId)
Returns the most recent progress record for the given job ID.
|
StartedJobInfo[] |
getMostRecentByJobId(long jobId,
long startTime,
int limit)
Returns an array of chronologically sorted progress records for the given job ID, starting at a given crawl time,
and limited to a given number of record.
|
int |
removeInfoForJob(long jobId)
Removes all records pertaining to the given job ID from the persistent storage.
|
void |
store(StartedJobInfo startedJobInfo)
Stores a
StartedJobInfo record to the persistent storage. |
int |
storeFrontierReport(String filterId,
InMemoryFrontierReport report,
Long jobId)
Store frontier report data to the persistent storage.
|
getInstance
public RunningJobsInfoDBDAO()
public void store(StartedJobInfo startedJobInfo)
StartedJobInfo
record to the persistent storage. The record is stored in the monitor table, and
if the elapsed time since the last history sample is equal or superior to the history sample rate, also to the
history table.store
in class RunningJobsInfoDAO
startedJobInfo
- the record to store.public StartedJobInfo[] getFullJobHistory(long jobId)
getFullJobHistory
in class RunningJobsInfoDAO
jobId
- the job id.public Map<String,List<StartedJobInfo>> getMostRecentByHarvestName()
getMostRecentByHarvestName
in class RunningJobsInfoDAO
public Set<Long> getHistoryRecordIds()
getHistoryRecordIds
in class RunningJobsInfoDAO
public StartedJobInfo[] getMostRecentByJobId(long jobId, long startTime, int limit)
getMostRecentByJobId
in class RunningJobsInfoDAO
jobId
- the job id.startTime
- the crawl time (in seconds) to begin.limit
- the maximum number of records to fetch.public StartedJobInfo getMostRecentByJobId(long jobId)
getMostRecentByJobId
in class RunningJobsInfoDAO
jobId
- the job id.public int removeInfoForJob(long jobId)
removeInfoForJob
in class RunningJobsInfoDAO
jobId
- the job id.public int storeFrontierReport(String filterId, InMemoryFrontierReport report, Long jobId)
storeFrontierReport
in class RunningJobsInfoDAO
report
- the report to storefilterId
- the id of the filter that produced the reportjobId
- The ID of the job responsible for this reportpublic String[] getFrontierReportFilterTypes()
getFrontierReportFilterTypes
in class RunningJobsInfoDAO
FrontierReportFilter.getFilterId()
public InMemoryFrontierReport getFrontierReport(long jobId, String filterId)
getFrontierReport
in class RunningJobsInfoDAO
jobId
- the job idfilterId
- the id of the filter that produced the reportpublic int deleteFrontierReports(long jobId)
deleteFrontierReports
in class RunningJobsInfoDAO
jobId
- the job idCopyright © 2005–2016 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.