本文整理汇总了Java中org.voltdb.sysprocs.saverestore.SnapshotUtil.Snapshot类的典型用法代码示例。如果您正苦于以下问题:Java Snapshot类的具体用法?Java Snapshot怎么用?Java Snapshot使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Snapshot类属于org.voltdb.sysprocs.saverestore.SnapshotUtil包,在下文中一共展示了Snapshot类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSnapshots
import org.voltdb.sysprocs.saverestore.SnapshotUtil.Snapshot; //导入依赖的package包/类
/**
* Finds all the snapshots in all the places we know of which could possibly
* store snapshots, like command log snapshots, auto snapshots, etc.
*
* @return All snapshots
*/
private Map<String, Snapshot> getSnapshots() {
/*
* Use the individual snapshot directories instead of voltroot, because
* they can be set individually
*/
List<String> paths = new ArrayList<String>();
if (VoltDB.instance().getConfig().m_isEnterprise) {
if (m_clSnapshotPath != null) {
paths.add(m_clSnapshotPath);
}
}
if (m_snapshotPath != null) {
paths.add(m_snapshotPath);
}
HashMap<String, Snapshot> snapshots = new HashMap<String, Snapshot>();
FileFilter filter = new SnapshotUtil.SnapshotFilter();
for (String path : paths) {
SnapshotUtil.retrieveSnapshotFiles(new File(path), snapshots, filter, false, LOG);
}
return snapshots;
}