Revision 7797
Added by Jing Tao over 11 years ago
metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/IndexEvent.java | ||
---|---|---|
44 | 44 |
private Identifier pid = null; |
45 | 45 |
private String description = null; |
46 | 46 |
private boolean isArchived = false; |
47 |
private long serialNumber; |
|
47 | 48 |
|
48 | 49 |
|
50 |
|
|
51 |
/** |
|
52 |
* Get the serial number of this event |
|
53 |
* @return |
|
54 |
*/ |
|
55 |
public long getSerialNumber() { |
|
56 |
return serialNumber; |
|
57 |
} |
|
49 | 58 |
|
50 | 59 |
/** |
60 |
* Set the serial number for this event |
|
61 |
* @param serialNumber |
|
62 |
*/ |
|
63 |
public void setSerialNumber(long serialNumber) { |
|
64 |
this.serialNumber = serialNumber; |
|
65 |
} |
|
66 |
|
|
67 |
/** |
|
51 | 68 |
* Get the type of the event. |
52 | 69 |
* @return the type of the event |
53 | 70 |
*/ |
metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/IndexEventLog.java | ||
---|---|---|
36 | 36 |
/** |
37 | 37 |
* Write an IndexEvent into a storage |
38 | 38 |
* @param event |
39 |
* @return the serial number for this event |
|
39 | 40 |
* @throws IndexEventLogException |
40 | 41 |
*/ |
41 |
public void write(IndexEvent event) throws IndexEventLogException;
|
|
42 |
public long write(IndexEvent event) throws IndexEventLogException;
|
|
42 | 43 |
|
43 | 44 |
|
44 | 45 |
/** |
... | ... | |
52 | 53 |
*/ |
53 | 54 |
public List<IndexEvent> getEvents(int type, Identifier pid, boolean archvied, Date start, Date end) throws IndexEventLogException; |
54 | 55 |
|
56 |
/** |
|
57 |
* Set the event with the specified serial number to be archived |
|
58 |
* @param serialNumber |
|
59 |
*/ |
|
60 |
public void setArchived(long serialNumber) throws IndexEventLogException; |
|
61 |
|
|
62 |
/** |
|
63 |
* Set the all events with the specified identifier to be archived |
|
64 |
* @param pid |
|
65 |
*/ |
|
66 |
public void setArchived(Identifier pid) throws IndexEventLogException; |
|
55 | 67 |
} |
Also available in: Unified diff
Add a serial number for the event.
Add method to set events to be archived.