]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/src/main/java/org/rocksdb/BackupInfo.java
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / rocksdb / java / src / main / java / org / rocksdb / BackupInfo.java
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under the BSD-style license found in the
3 // LICENSE file in the root directory of this source tree. An additional grant
4 // of patent rights can be found in the PATENTS file in the same directory.
5 package org.rocksdb;
6
7 /**
8 * Instances of this class describe a Backup made by
9 * {@link org.rocksdb.BackupableDB}.
10 */
11 public class BackupInfo {
12
13 /**
14 * Package private constructor used to create instances
15 * of BackupInfo by {@link org.rocksdb.BackupableDB} and
16 * {@link org.rocksdb.RestoreBackupableDB}.
17 *
18 * @param backupId id of backup
19 * @param timestamp timestamp of backup
20 * @param size size of backup
21 * @param numberFiles number of files related to this backup.
22 */
23 BackupInfo(final int backupId, final long timestamp, final long size,
24 final int numberFiles) {
25 backupId_ = backupId;
26 timestamp_ = timestamp;
27 size_ = size;
28 numberFiles_ = numberFiles;
29 }
30
31 /**
32 *
33 * @return the backup id.
34 */
35 public int backupId() {
36 return backupId_;
37 }
38
39 /**
40 *
41 * @return the timestamp of the backup.
42 */
43 public long timestamp() {
44 return timestamp_;
45 }
46
47 /**
48 *
49 * @return the size of the backup
50 */
51 public long size() {
52 return size_;
53 }
54
55 /**
56 *
57 * @return the number of files of this backup.
58 */
59 public int numberFiles() {
60 return numberFiles_;
61 }
62
63 private int backupId_;
64 private long timestamp_;
65 private long size_;
66 private int numberFiles_;
67 }