Improve Javadoc

This commit is contained in:
Adam Retter 2016-01-24 14:04:28 +00:00
parent 18eb563058
commit 0e7e6f6e4b
2 changed files with 19 additions and 3 deletions

View File

@ -8,7 +8,8 @@ package org.rocksdb;
* A CompactionFilter allows an application to modify/delete a key-value at * A CompactionFilter allows an application to modify/delete a key-value at
* the time of compaction. * the time of compaction.
* *
* At present we just permit an overriding Java class to wrap a C++ implementation * At present we just permit an overriding Java class to wrap a C++
* implementation
*/ */
public abstract class AbstractCompactionFilter<T extends AbstractSlice<?>> public abstract class AbstractCompactionFilter<T extends AbstractSlice<?>>
extends RocksObject { extends RocksObject {
@ -18,10 +19,10 @@ public abstract class AbstractCompactionFilter<T extends AbstractSlice<?>>
} }
/** /**
* Deletes underlying C++ comparator pointer. * Deletes underlying C++ compaction pointer.
* *
* Note that this function should be called only after all * Note that this function should be called only after all
* RocksDB instances referencing the comparator are closed. * RocksDB instances referencing the compaction filter are closed.
* Otherwise an undefined behavior will occur. * Otherwise an undefined behavior will occur.
*/ */
@Override @Override

View File

@ -30,6 +30,7 @@ public class BackupEngine extends RocksObject implements AutoCloseable {
* @param options Any options for the backup engine * @param options Any options for the backup engine
* *
* @return A new BackupEngine instance * @return A new BackupEngine instance
* @throws RocksDBException thrown if the backup engine could not be opened
*/ */
public static BackupEngine open(final Env env, public static BackupEngine open(final Env env,
final BackupableDBOptions options) throws RocksDBException { final BackupableDBOptions options) throws RocksDBException {
@ -45,6 +46,8 @@ public class BackupEngine extends RocksObject implements AutoCloseable {
* @param db The database to backup * @param db The database to backup
* *
* Note - This method is not thread safe * Note - This method is not thread safe
*
* @throws RocksDBException thrown if a new backup could not be created
*/ */
public void createNewBackup(final RocksDB db) throws RocksDBException { public void createNewBackup(final RocksDB db) throws RocksDBException {
createNewBackup(db, false); createNewBackup(db, false);
@ -68,6 +71,8 @@ public class BackupEngine extends RocksObject implements AutoCloseable {
* parameter. * parameter.
* *
* Note - This method is not thread safe * Note - This method is not thread safe
*
* @throws RocksDBException thrown if a new backup could not be created
*/ */
public void createNewBackup( public void createNewBackup(
final RocksDB db, final boolean flushBeforeBackup) final RocksDB db, final boolean flushBeforeBackup)
@ -116,6 +121,8 @@ public class BackupEngine extends RocksObject implements AutoCloseable {
* Deletes old backups, keeping just the latest numBackupsToKeep * Deletes old backups, keeping just the latest numBackupsToKeep
* *
* @param numBackupsToKeep The latest n backups to keep * @param numBackupsToKeep The latest n backups to keep
*
* @throws RocksDBException thrown if the old backups could not be deleted
*/ */
public void purgeOldBackups( public void purgeOldBackups(
final int numBackupsToKeep) throws RocksDBException { final int numBackupsToKeep) throws RocksDBException {
@ -127,6 +134,8 @@ public class BackupEngine extends RocksObject implements AutoCloseable {
* Deletes a backup * Deletes a backup
* *
* @param backupId The id of the backup to delete * @param backupId The id of the backup to delete
*
* @throws RocksDBException thrown if the backup could not be deleted
*/ */
public void deleteBackup(final int backupId) throws RocksDBException { public void deleteBackup(final int backupId) throws RocksDBException {
assert (isOwningHandle()); assert (isOwningHandle());
@ -152,6 +161,8 @@ public class BackupEngine extends RocksObject implements AutoCloseable {
* @param walDir The location of the log files for your database, * @param walDir The location of the log files for your database,
* often the same as dbDir * often the same as dbDir
* @param restoreOptions Options for controlling the restore * @param restoreOptions Options for controlling the restore
*
* @throws RocksDBException thrown if the database could not be restored
*/ */
public void restoreDbFromBackup( public void restoreDbFromBackup(
final int backupId, final String dbDir, final String walDir, final int backupId, final String dbDir, final String walDir,
@ -167,6 +178,8 @@ public class BackupEngine extends RocksObject implements AutoCloseable {
* @param dbDir The directory to restore the backup to, i.e. where your database is * @param dbDir The directory to restore the backup to, i.e. where your database is
* @param walDir The location of the log files for your database, often the same as dbDir * @param walDir The location of the log files for your database, often the same as dbDir
* @param restoreOptions Options for controlling the restore * @param restoreOptions Options for controlling the restore
*
* @throws RocksDBException thrown if the database could not be restored
*/ */
public void restoreDbFromLatestBackup( public void restoreDbFromLatestBackup(
final String dbDir, final String walDir, final String dbDir, final String walDir,
@ -178,6 +191,8 @@ public class BackupEngine extends RocksObject implements AutoCloseable {
/** /**
* Close the Backup Engine * Close the Backup Engine
*
* @throws RocksDBException thrown if the backup engine could not be closed
*/ */
@Override @Override
public void close() throws RocksDBException { public void close() throws RocksDBException {