本文整理了Java中org.jvnet.solaris.libzfs.ZFSObject.destory()
方法的一些代码示例,展示了ZFSObject.destory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZFSObject.destory()
方法的具体详情如下:
包路径:org.jvnet.solaris.libzfs.ZFSObject
类名称:ZFSObject
方法名:destory
暂无
代码示例来源:origin: org.jvnet.libzfs/libzfs
/**
* Wipes out this dataset and all its data, optionally recursively.
*/
public void destory(boolean recursive) {
if(recursive) {
for (ZFSObject child : children())
child.destory(recursive);
}
destory();
}
代码示例来源:origin: org.kohsuke/libzfs
public ZFSObject rollback(boolean recursive) {
String filesystem = name.substring(0, getName().indexOf("@"));
ZFSObject fs = library.open(filesystem);
if (recursive) {
/* first pass - check for clones */
List<ZFSObject> list = fs.getChildren();
for (ZFSObject child : list) {
if (!child.getName().startsWith(filesystem + "@")) {
return child;
}
}
/* second pass - find snapshot index, destroy later snapshots */
boolean found = false;
for (ZFSObject snap : fs.snapshots()) {
String name = snap.getName();
if (name.equals(getName())) {
found = true;
continue;
}
if (found) {
snap.destory();
}
}
}
if (LIBZFS.zfs_rollback(fs.handle, handle, recursive) != 0)
throw new ZFSException(library);
return library.open(filesystem);
}
代码示例来源:origin: org.jvnet.libzfs/libzfs
public ZFSObject rollback(boolean recursive) {
String filesystem = name.substring(0, getName().indexOf("@"));
ZFSObject fs = library.open(filesystem);
if (recursive) {
/* first pass - check for clones */
List<ZFSObject> list = fs.getChildren();
for (ZFSObject child : list) {
if (!child.getName().startsWith(filesystem + "@")) {
return child;
}
}
/* second pass - find snapshot index, destroy later snapshots */
boolean found = false;
for (ZFSObject snap : fs.snapshots()) {
String name = snap.getName();
if (name.equals(getName())) {
found = true;
continue;
}
if (found) {
snap.destory();
}
}
}
if (LIBZFS.zfs_rollback(fs.handle, handle, recursive) != 0)
throw new ZFSException(library);
return library.open(filesystem);
}
内容来源于网络,如有侵权,请联系作者删除!