| | |
| | | * @param changeNumber |
| | | * the provided change number. |
| | | * @return the associated CSN, null when none. |
| | | * @throws ChangelogException |
| | | * if a database problem occurs. |
| | | */ |
| | | public CSN getCSN(long changeNumber); |
| | | public CSN getCSN(long changeNumber) throws ChangelogException; |
| | | |
| | | /** |
| | | * Get the baseDN associated to a provided change number. |
| | |
| | | * @param changeNumber |
| | | * the provided change number. |
| | | * @return the baseDN, null when none. |
| | | * @throws ChangelogException |
| | | * if a database problem occurs. |
| | | */ |
| | | public String getBaseDN(long changeNumber); |
| | | public String getBaseDN(long changeNumber) throws ChangelogException; |
| | | |
| | | /** |
| | | * Get the previous cookie associated to a provided change number. |
| | |
| | | * @param changeNumber |
| | | * the provided change number. |
| | | * @return the previous cookie, null when none. |
| | | * @throws ChangelogException |
| | | * if a database problem occurs. |
| | | */ |
| | | String getPreviousCookie(long changeNumber); |
| | | String getPreviousCookie(long changeNumber) throws ChangelogException; |
| | | |
| | | /** |
| | | * Get the first change number stored in this DB. |
| | | * |
| | | * @return Returns the first change number in this DB. |
| | | * @throws ChangelogException |
| | | * if a database problem occurs. |
| | | */ |
| | | long getFirstChangeNumber(); |
| | | long getFirstChangeNumber() throws ChangelogException; |
| | | |
| | | /** |
| | | * Get the last change number stored in this DB. |
| | | * |
| | | * @return Returns the last change number in this DB |
| | | * @throws ChangelogException |
| | | * if a database problem occurs. |
| | | */ |
| | | long getLastChangeNumber(); |
| | | long getLastChangeNumber() throws ChangelogException; |
| | | |
| | | /** |
| | | * Add an update to the list of messages that must be saved to this DB managed |
| | |
| | | * The associated baseDN. |
| | | * @param csn |
| | | * The associated replication CSN. |
| | | * @throws ChangelogException |
| | | * if a database problem occurs. |
| | | */ |
| | | void add(long changeNumber, String previousCookie, String baseDN, CSN csn); |
| | | void add(long changeNumber, String previousCookie, String baseDN, CSN csn) |
| | | throws ChangelogException; |
| | | |
| | | /** |
| | | * Generate a new {@link ChangeNumberIndexDBCursor} that allows to browse the |
| | |
| | | * this DBHandler and starting at the position defined by a given |
| | | * changeNumber. |
| | | * @throws ChangelogException |
| | | * if a database problem happened. |
| | | * if a database problem occurs. |
| | | */ |
| | | ChangeNumberIndexDBCursor getCursorFrom(long startChangeNumber) |
| | | throws ChangelogException; |
| | |
| | | * |
| | | * @return <code>true</code> if this database is empty, <code>false</code> |
| | | * otherwise |
| | | * @throws ChangelogException |
| | | * if a database problem occurs. |
| | | */ |
| | | boolean isEmpty(); |
| | | boolean isEmpty() throws ChangelogException; |
| | | |
| | | /** |
| | | * Clear the changes from this DB (from both memory cache and DB storage). |
| | | * |
| | | * @throws ChangelogException |
| | | * When an exception occurs while removing the changes from this DB. |
| | | * if a database problem occurs. |
| | | */ |
| | | void clear() throws ChangelogException; |
| | | |
| | |
| | | * The baseDN for which we want to remove all records from this DB, |
| | | * null means all. |
| | | * @throws ChangelogException |
| | | * When an exception occurs while removing the changes from this DB. |
| | | * if a database problem occurs. |
| | | */ |
| | | void clear(String baseDNToClear) throws ChangelogException; |
| | | |
| | | /** |
| | | * Shutdown this DB. |
| | | * |
| | | * @throws ChangelogException |
| | | * if a database problem occurs. |
| | | */ |
| | | void shutdown(); |
| | | void shutdown() throws ChangelogException; |
| | | |
| | | } |