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 nowLibvirtException
protected void finalize() throws LibvirtException
finalize
in class java.lang.Object
LibvirtException
public int free() throws LibvirtException
LibvirtException
public Connect getConnect()
public StorageVolInfo getInfo() throws LibvirtException
LibvirtException
public java.lang.String getKey() throws LibvirtException
LibvirtException
public java.lang.String getName() throws LibvirtException
LibvirtException
public java.lang.String getPath() throws LibvirtException
LibvirtException
public java.lang.String getXMLDesc(int flags) throws LibvirtException
flags
- flags for XML generation (unused, pass 0)LibvirtException
protected void processError() throws LibvirtException
LibvirtException
public StoragePool storagePoolLookupByVolume() throws LibvirtException
LibvirtException
public int wipe() throws LibvirtException
LibvirtException
public int resize(long capacity, int flags) throws LibvirtException
capacity
- new capacity for volumeflags
- flags for resizing, see libvirt API for exact flagsLibvirtException