1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 // This source code is licensed under both the GPLv2 (found in the 3 // COPYING file in the root directory) and Apache 2.0 License 4 // (found in the LICENSE.Apache file in the root directory). 5 6 package org.rocksdb; 7 8 /** 9 * RestoreOptions to control the behavior of restore. 10 * 11 * Note that dispose() must be called before this instance become out-of-scope 12 * to release the allocated memory in c++. 13 * 14 */ 15 public class RestoreOptions extends RocksObject { 16 /** 17 * Constructor 18 * 19 * @param keepLogFiles If true, restore won't overwrite the existing log files 20 * in wal_dir. It will also move all log files from archive directory to 21 * wal_dir. Use this option in combination with 22 * BackupableDBOptions::backup_log_files = false for persisting in-memory 23 * databases. 24 * Default: false 25 */ RestoreOptions(final boolean keepLogFiles)26 public RestoreOptions(final boolean keepLogFiles) { 27 super(newRestoreOptions(keepLogFiles)); 28 } 29 newRestoreOptions(boolean keepLogFiles)30 private native static long newRestoreOptions(boolean keepLogFiles); disposeInternal(final long handle)31 @Override protected final native void disposeInternal(final long handle); 32 } 33