blob: 4180a192ae49b10bb62f9c12ab4169be2302afc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package com.keuin.kbackupfabric.metadata;
/**
* In the first startup after restoring from a previous backup, the metadata is stored in this class.
* The setMetadata can only be called when startup
*/
public class MetadataHolder {
private static BackupMetadata metadata = null;
public static BackupMetadata getMetadata() {
return metadata;
}
public static void setMetadata(BackupMetadata metadata) {
if (MetadataHolder.metadata == null)
MetadataHolder.metadata = metadata;
}
public static boolean hasMetadata() {
return MetadataHolder.metadata != null;
}
}
|