forked from facebook/rocksdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request facebook#366 from fyrz/RocksJava-Backup-Restore-Im…
…provements [RocksJava] - BackupInfos & Restore-/BackupableDB enhancements
- Loading branch information
Showing
8 changed files
with
280 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// Copyright (c) 2014, Facebook, Inc. All rights reserved. | ||
// This source code is licensed under the BSD-style license found in the | ||
// LICENSE file in the root directory of this source tree. An additional grant | ||
// of patent rights can be found in the PATENTS file in the same directory. | ||
package org.rocksdb; | ||
|
||
/** | ||
* Instances of this class describe a Backup made by | ||
* {@link org.rocksdb.BackupableDB}. | ||
*/ | ||
public class BackupInfo { | ||
|
||
/** | ||
* Package private constructor used to create instances | ||
* of BackupInfo by {@link org.rocksdb.BackupableDB} and | ||
* {@link org.rocksdb.RestoreBackupableDB}. | ||
* | ||
* @param backupId id of backup | ||
* @param timestamp timestamp of backup | ||
* @param size size of backup | ||
* @param numberFiles number of files related to this backup. | ||
*/ | ||
BackupInfo(int backupId, long timestamp, long size, | ||
int numberFiles) { | ||
backupId_ = backupId; | ||
timestamp_ = timestamp; | ||
size_ = size; | ||
numberFiles_ = numberFiles; | ||
} | ||
|
||
/** | ||
* | ||
* @return the backup id. | ||
*/ | ||
public int backupId() { | ||
return backupId_; | ||
} | ||
|
||
/** | ||
* | ||
* @return the timestamp of the backup. | ||
*/ | ||
public long timestamp() { | ||
return timestamp_; | ||
} | ||
|
||
/** | ||
* | ||
* @return the size of the backup | ||
*/ | ||
public long size() { | ||
return size_; | ||
} | ||
|
||
/** | ||
* | ||
* @return the number of files of this backup. | ||
*/ | ||
public int numberFiles() { | ||
return numberFiles_; | ||
} | ||
|
||
private int backupId_; | ||
private long timestamp_; | ||
private long size_; | ||
private int numberFiles_; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.