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 intdelete(int flags)Delete the Snapshotvoidfinalize()intfree()Release the domain snapshot handle.java.lang.StringgetXMLDesc()Fetches an XML document describing attributes of the snapshot.protected voidprocessError()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 LibvirtExceptionDelete 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:
finalizein classjava.lang.Object- Throws:
LibvirtException
-
free
public int free() throws LibvirtExceptionRelease 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 LibvirtExceptionFetches an XML document describing attributes of the snapshot.- Returns:
- the XML document
- Throws:
LibvirtException- See Also:
- Libvirt Documentation
-
processError
protected void processError() throws LibvirtExceptionError handling logic to throw errors. Must be called after every libvirt call.- Throws:
LibvirtException
-
-