source: OAIHarvester/trunk/OAIHarvester/src/main/java/eu/clarin/cmdi/oai/harvester/HarvestJob.java @ 1145

Last change on this file since 1145 was 1145, checked in by oschonef, 13 years ago
  • use int for request and resumption count
  • Property svn:eol-style set to native
File size: 1.5 KB
Line 
1package eu.clarin.cmdi.oai.harvester;
2
3import java.util.Date;
4import java.util.List;
5
6public interface HarvestJob {
7    public enum State {
8        NEW,
9        RUNNING,
10        DONE,
11        ERROR,
12        CANCELED
13    } // enum State
14
15    public interface Statistics {
16        public String getPrefix();
17       
18        public long getRecordCount();
19       
20        public int getRequestCount();
21       
22        public int getResumptionCount();
23
24        public long getBytesTransferred();
25       
26        public Date getLatestDatestamp();
27    } // interface Statistics
28
29    public long getId();
30
31    public State getState();
32
33    public boolean isRunning();
34
35    public long getTotelRecordCount();
36
37    public int getTotelRequestCount();
38
39    public long getTotalBytesTransferred();
40
41    public long getTotalTime();
42
43    public long getNetworkTime();
44
45    public long getWaitTime();
46
47    public long getProcessingTime();
48
49    public HarvestHandler getHarvestHandler();
50
51    public Date getFrom();
52   
53    public void setFrom(Date from);
54   
55    public Date getUntil();
56   
57    public void setUntil(Date until);
58
59    public String getSet();
60   
61    public void setSet(String set);
62
63    public List<String> getMetadataPrefixes();
64   
65    public void setMetadataPrefixes(List<String> prefixes);
66
67    public Statistics getStatistics(String prefix);
68   
69    public List<Statistics> getStatistics();
70
71    public void run() throws HarvesterException;
72
73    public void cancel() throws HarvesterException;
74
75} // interface HarvestJob
Note: See TracBrowser for help on using the repository browser.