- modificationCounter = sone.getModificationCounter();
- if (modificationCounter > 0) {
- sone.setTime(System.currentTimeMillis());
- insertInformation = new InsertInformation(sone);
+ if (sone.getModificationCounter() > modificationCounter) {
+ modificationCounter = sone.getModificationCounter();
+ lastModificationTime = System.currentTimeMillis();
+ sone.setTime(lastModificationTime);
+ logger.log(Level.FINE, "Sone %s has been modified, waiting 60 seconds before inserting.", new Object[] { sone.getName() });
+ if ((System.currentTimeMillis() - lastModificationTime) > (60 * 1000)) {
+ insertInformation = new InsertInformation(sone);
+ }