| | |
| | | |
| | | return db.count(); |
| | | } |
| | | catch (Exception e) |
| | | catch (DatabaseException e) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | try |
| | | { |
| | | return record; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | return null; |
| | | } |
| | | return record; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Go to the next record on the cursor. |
| | | * @return the next record on this cursor. |
| | |
| | | */ |
| | | public boolean next() throws ChangelogException |
| | | { |
| | | // first wipe old entry |
| | | record = null; |
| | | if (isClosed) |
| | | { |
| | | return false; |
| | |
| | | |
| | | try { |
| | | OperationStatus status = cursor.getNext(key, entry, LockMode.DEFAULT); |
| | | if (status != OperationStatus.SUCCESS) |
| | | if (status == OperationStatus.SUCCESS) |
| | | { |
| | | record = null; |
| | | return false; |
| | | record = newCNIndexRecord(this.key, entry); |
| | | return true; |
| | | } |
| | | record = newCNIndexRecord(this.key, entry); |
| | | return false; |
| | | } |
| | | catch(Exception e) |
| | | catch (DatabaseException e) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | throw new ChangelogException(e); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |