void () { if (!isDirty()) return; getWriteLock().lock(); try { lockStorageWrite(); try { if (isDirty()) { if (myKeyStorage.isDirty()) { myKeyStorage.force(); } if (myCollisionResolutionStorage.isDirty()) { doFlush(); } } } catch (IOException e) { throw new RuntimeException(e); } finally { unlockStorageWrite(); } } finally { getWriteLock().unlock(); } }