1 | package eu.clarin.cmdi.oai.harvester; |
---|
2 | |
---|
3 | import java.util.Date; |
---|
4 | import java.util.List; |
---|
5 | |
---|
6 | public 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 |
---|