use of com.alipay.sofa.jraft.entity.LocalStorageOutter.LocalSnapshotPbMeta in project sofa-jraft by sofastack.
the class LocalSnapshotMetaTable method loadFromFile.
/**
* Load metadata infos from a file by path.
*/
public boolean loadFromFile(String path) throws IOException {
ProtoBufFile pbFile = new ProtoBufFile(path);
LocalSnapshotPbMeta pbMeta = pbFile.load();
if (pbMeta == null) {
LOG.error("Fail to load meta from {}.", path);
return false;
}
return loadFromPbMeta(pbMeta);
}
Aggregations