public class StorageVol
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
StorageVol.ResizeFlags |
static class |
StorageVol.Type |
| Modifier and Type | Field and Description |
|---|---|
protected Connect |
virConnect
The VirConnect Object that represents the Hypervisor of this Domain
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete(int flags)
Delete the storage volume from the pool
|
protected void |
finalize() |
int |
free()
Release the storage volume handle.
|
Connect |
getConnect()
Provides the connection object associated with a storage volume.
|
StorageVolInfo |
getInfo()
Fetches volatile information about the storage volume such as its current
allocation
|
java.lang.String |
getKey()
Fetch the storage volume key.
|
java.lang.String |
getName()
Fetch the storage volume name.
|
java.lang.String |
getPath()
Fetch the storage volume path.
|
java.lang.String |
getXMLDesc(int flags)
Fetch an XML document describing all aspects of this storage volume
|
protected void |
processError()
Error handling logic which should be called after every libvirt call
|
int |
resize(long capacity,
int flags)
Resize a volume
|
StoragePool |
storagePoolLookupByVolume()
Fetch a storage pool which contains this volume
|
int |
wipe()
Ensure data previously on a volume is not accessible to future reads
|
protected Connect virConnect
public void delete(int flags)
throws LibvirtException
flags - future flags, use 0 for nowLibvirtExceptionprotected void finalize()
throws LibvirtException
finalize in class java.lang.ObjectLibvirtExceptionpublic int free()
throws LibvirtException
LibvirtExceptionpublic Connect getConnect()
public StorageVolInfo getInfo() throws LibvirtException
LibvirtExceptionpublic java.lang.String getKey()
throws LibvirtException
LibvirtExceptionpublic java.lang.String getName()
throws LibvirtException
LibvirtExceptionpublic java.lang.String getPath()
throws LibvirtException
LibvirtExceptionpublic java.lang.String getXMLDesc(int flags)
throws LibvirtException
flags - flags for XML generation (unused, pass 0)LibvirtExceptionprotected void processError()
throws LibvirtException
LibvirtExceptionpublic StoragePool storagePoolLookupByVolume() throws LibvirtException
LibvirtExceptionpublic int wipe()
throws LibvirtException
LibvirtExceptionpublic int resize(long capacity,
int flags)
throws LibvirtException
capacity - new capacity for volumeflags - flags for resizing, see libvirt API for exact flagsLibvirtException