public void commit(final FeatureStore store) throws DataStoreException { writeLock.lock(); try { for (int i = 0, n = deltas.size(); i < n; i++) { final Delta alt = deltas.get(i); final Map<String, String> updates = alt.commit(store); alt.dispose(); // update next deltas if (updates != null) { for (int j = i + 1; j < n; j++) { final Delta next = deltas.get(j); next.update(updates); } } } deltas.clear(); readCopy = null; } finally { writeLock.unlock(); } }