Package org.libvirt
Class DomainSnapshot
- java.lang.Object
-
- org.libvirt.DomainSnapshot
-
public class DomainSnapshot extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description DomainSnapshot(Connect virConnect, DomainSnapshotPointer VDSP)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
delete(int flags)
Delete the Snapshotvoid
finalize()
int
free()
Release the domain snapshot handle.java.lang.String
getXMLDesc()
Fetches an XML document describing attributes of the snapshot.protected void
processError()
Error handling logic to throw errors.
-
-
-
Field Detail
-
libvirt
protected Libvirt libvirt
The libvirt connection from the hypervisor
-
-
Constructor Detail
-
DomainSnapshot
public DomainSnapshot(Connect virConnect, DomainSnapshotPointer VDSP)
-
-
Method Detail
-
delete
public int delete(int flags) throws LibvirtException
Delete the Snapshot- Parameters:
flags
- controls teh deletion- Returns:
- 0 if the selected snapshot(s) were successfully deleted, -1 on error.
- Throws:
LibvirtException
- See Also:
- Libvirt Documentation
-
finalize
public void finalize() throws LibvirtException
- Overrides:
finalize
in classjava.lang.Object
- Throws:
LibvirtException
-
free
public int free() throws LibvirtException
Release the domain snapshot handle. The underlying snapshot continues to exist.- Returns:
- 0 on success, or -1 on error.
- Throws:
LibvirtException
-
getXMLDesc
public java.lang.String getXMLDesc() throws LibvirtException
Fetches an XML document describing attributes of the snapshot.- Returns:
- the XML document
- Throws:
LibvirtException
- See Also:
- Libvirt Documentation
-
processError
protected void processError() throws LibvirtException
Error handling logic to throw errors. Must be called after every libvirt call.- Throws:
LibvirtException
-
-