use less aggressive time period for polling master data import progress

This commit is contained in:
Axel Uhl committed 2014-02-20 23:02:53 +01:00
1 parent 8e0b381c06
commit bc0de434d7
2 files changed
+6 -5

No files matched your search

@@ -10,8 +10,10 @@ import java.util.concurrent.locks.ReentrantLock;
import com.sap.sailing.domain.common.DataImportProgress;
public class DataImportLockWithProgress extends ReentrantLock {
private static final int TIME_TO_DELETE_PROGRESS_ENTRY_AFTER_OPERATION_FINISHED = 60000;
/**
* Defaults to 60s (60000ms).
*/
private static final int TIME_TO_DELETE_PROGRESS_ENTRY_AFTER_OPERATION_FINISHED_IN_MILLIS = 60000;
private static final long serialVersionUID = -3527221613483691340L;
@@ -43,7 +45,6 @@ public class DataImportLockWithProgress extends ReentrantLock {
*/
private void setDeleteFromMapTimer(final DataImportProgress progressToDelete) {
TimerTask deleteTask = new TimerTask() {
@Override
public void run() {
synchronized (progressPerId) {
@@ -52,7 +53,7 @@ public class DataImportLockWithProgress extends ReentrantLock {
}
};
Timer timer = new Timer();
timer.schedule(deleteTask, TIME_TO_DELETE_PROGRESS_ENTRY_AFTER_OPERATION_FINISHED);
timer.schedule(deleteTask, TIME_TO_DELETE_PROGRESS_ENTRY_AFTER_OPERATION_FINISHED_IN_MILLIS);
}
/**