| | |
| | | if (doClear.get()) |
| | | { |
| | | removeAllCursors(); |
| | | resetNextChangeForInsertDBCursor(); |
| | | // No need to use CAS here because it is only for unit tests and at |
| | | // this point all will have been cleaned up anyway. |
| | | doClear.set(false); |
| | |
| | | Thread.currentThread().interrupt(); |
| | | } |
| | | } |
| | | removeAllCursors(); |
| | | } |
| | | catch (ChangelogException e) |
| | | { |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | // TODO JNR error message i18n |
| | | } |
| | | finally |
| | | { |
| | | removeAllCursors(); |
| | | } |
| | | } |
| | | |
| | | private void moveForwardMediumConsistencyPoint(final CSN csn, final DN baseDN) |
| | |
| | | } |
| | | } |
| | | |
| | | private void removeAllCursors() throws ChangelogException |
| | | private void removeAllCursors() |
| | | { |
| | | if (nextChangeForInsertDBCursor != null) |
| | | { |
| | | nextChangeForInsertDBCursor.close(); |
| | | nextChangeForInsertDBCursor = null; |
| | | } |
| | | for (Map<Integer, DBCursor<UpdateMsg>> map : allCursors.values()) |
| | | { |
| | | StaticUtils.close(map.values()); |
| | | } |
| | | allCursors.clear(); |
| | | newCursors.clear(); |
| | | resetNextChangeForInsertDBCursor(); |
| | | } |
| | | |
| | | private void removeCursor(final DN baseDN, final CSN csn) |