Revision 7840
Added by ben leinfelder over 10 years ago
ReplicationService.java | ||
---|---|---|
111 | 111 |
private static Vector<String> fileLocks = new Vector<String>(); |
112 | 112 |
// private Thread lockThread = null; |
113 | 113 |
public static final String FORCEREPLICATEDELETE = "forcereplicatedelete"; |
114 |
public static final String FORCEREPLICATEDELETEALL = "forcereplicatedeleteall"; |
|
114 | 115 |
private static String TIMEREPLICATION = "replication.timedreplication"; |
115 | 116 |
private static String TIMEREPLICATIONINTERVAl ="replication.timedreplicationinterval"; |
116 | 117 |
private static String FIRSTTIME = "replication.firsttimedreplication"; |
... | ... | |
721 | 722 |
*/ |
722 | 723 |
protected static void handleForceReplicateDeleteRequest( |
723 | 724 |
Hashtable<String, String[]> params, HttpServletResponse response, |
724 |
HttpServletRequest request) { |
|
725 |
HttpServletRequest request, boolean removeAll) {
|
|
725 | 726 |
String server = ((String[]) params.get("server"))[0]; // the server that |
726 | 727 |
String docid = ((String[]) params.get("docid"))[0]; // sent the document |
727 | 728 |
try { |
... | ... | |
729 | 730 |
logReplication.info("ReplicationService.handleForceReplicateDeleteRequest - force replication delete docid " + docid); |
730 | 731 |
logReplication.info("ReplicationService.handleForceReplicateDeleteRequest - Force replication delete request from: " + server); |
731 | 732 |
logReplication.info("ReplicationService.handleForceReplicateDeleteRequest - Force replication delete docid: " + docid); |
732 |
DocumentImpl.delete(docid, null, null, server, false);
|
|
733 |
DocumentImpl.delete(docid, null, null, server, removeAll);
|
|
733 | 734 |
logReplication.info("ReplicationService.handleForceReplicateDeleteRequest - document " + docid + " was successfully deleted "); |
734 | 735 |
EventLog.getInstance().log(request.getRemoteAddr(), request.getHeader("User-Agent"), REPLICATIONUSER, docid, |
735 | 736 |
"delete"); |
Also available in: Unified diff
support a "force replication delete all action" during replication. This is used when we want Metacat to remove the content from the other target replicas because the DataONE delete() action was called (more powerful than just "archive").