]> git.proxmox.com Git - ceph.git/blame - ceph/src/rocksdb/java/src/main/java/org/rocksdb/BackupInfo.java
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / rocksdb / java / src / main / java / org / rocksdb / BackupInfo.java
CommitLineData
7c673cae 1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
11fdf7f2
TL
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).
7c673cae
FG
5package org.rocksdb;
6
7/**
8 * Instances of this class describe a Backup made by
11fdf7f2 9 * {@link org.rocksdb.BackupEngine}.
7c673cae
FG
10 */
11public class BackupInfo {
12
13 /**
14 * Package private constructor used to create instances
11fdf7f2 15 * of BackupInfo by {@link org.rocksdb.BackupEngine}
7c673cae
FG
16 *
17 * @param backupId id of backup
18 * @param timestamp timestamp of backup
19 * @param size size of backup
20 * @param numberFiles number of files related to this backup.
21 */
11fdf7f2
TL
22 BackupInfo(final int backupId, final long timestamp, final long size, final int numberFiles,
23 final String app_metadata) {
7c673cae
FG
24 backupId_ = backupId;
25 timestamp_ = timestamp;
26 size_ = size;
27 numberFiles_ = numberFiles;
11fdf7f2 28 app_metadata_ = app_metadata;
7c673cae
FG
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
11fdf7f2
TL
63 /**
64 *
65 * @return the associated application metadata, or null
66 */
67 public String appMetadata() {
68 return app_metadata_;
69 }
70
7c673cae
FG
71 private int backupId_;
72 private long timestamp_;
73 private long size_;
74 private int numberFiles_;
11fdf7f2 75 private String app_metadata_;
7c673cae 76}