public class StoragePool
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected Connect |
virConnect
The VirConnect Object that represents the Hypervisor of this Domain
|
protected StoragePoolPointer |
VSPP
the native virStoragePoolPtr.
|
| Modifier and Type | Method and Description |
|---|---|
void |
build(int flags)
Build the underlying storage pool
|
void |
create(int flags)
Starts this inactive storage pool
|
void |
delete(int flags)
Delete the underlying pool resources.
|
void |
destroy()
Destroy an active storage pool.
|
protected void |
finalize() |
int |
free()
Free a storage pool object, releasing all memory associated with it.
|
boolean |
getAutostart()
Fetches the value of the autostart flag, which determines whether the
pool is automatically started at boot time
|
Connect |
getConnect()
Provides the connection pointer associated with a storage pool.
|
StoragePoolInfo |
getInfo()
Get volatile information about the storage pool such as free space /
usage summary
|
java.lang.String |
getName()
Fetch the locally unique name of the storage pool
|
int[] |
getUUID()
Fetch the globally unique ID of this storage pool
|
java.lang.String |
getUUIDString()
Fetch the globally unique ID of the storage pool as a string
|
java.lang.String |
getXMLDesc(int flags)
Fetch an XML document describing all aspects of the storage pool.
|
int |
isActive()
Determine if the storage pool is currently running
|
int |
isPersistent()
Determine if the storage pool has a persistent configuration which means
it will still exist after shutting down
|
java.lang.String[] |
listVolumes()
Fetch list of storage volume names
|
int |
numOfVolumes()
Fetch the number of storage volumes within a pool
|
protected void |
processError() |
void |
refresh(int flags)
Request that the pool refresh its list of volumes.
|
void |
setAutostart(int autostart)
Sets the autostart flag
|
StorageVol |
storageVolCreateXML(java.lang.String xmlDesc,
int flags)
Create a storage volume within a pool based on an XML description.
|
StorageVol |
storageVolCreateXMLFrom(java.lang.String xmlDesc,
StorageVol cloneVolume,
int flags)
Create a storage volume in the parent pool, using the 'clonevol' volume
as input.
|
StorageVol |
storageVolLookupByName(java.lang.String name)
Fetch an object representing to a storage volume based on its name within
a pool
|
void |
undefine()
Undefine an inactive storage pool
|
protected StoragePoolPointer VSPP
protected Connect virConnect
public void build(int flags)
throws LibvirtException
flags - future flags, use 0 for nowLibvirtExceptionpublic void create(int flags)
throws LibvirtException
flags - future flags, use 0 for nowLibvirtExceptionpublic void delete(int flags)
throws LibvirtException
flags - flags for obliteration processLibvirtExceptionpublic void destroy()
throws LibvirtException
LibvirtExceptionprotected void finalize()
throws LibvirtException
finalize in class java.lang.ObjectLibvirtExceptionpublic int free()
throws LibvirtException
LibvirtExceptionpublic boolean getAutostart()
throws LibvirtException
LibvirtExceptionpublic Connect getConnect()
public StoragePoolInfo getInfo() throws LibvirtException
LibvirtExceptionpublic java.lang.String getName()
throws LibvirtException
LibvirtExceptionpublic int[] getUUID()
throws LibvirtException
LibvirtExceptionpublic java.lang.String getUUIDString()
throws LibvirtException
LibvirtExceptionpublic java.lang.String getXMLDesc(int flags)
throws LibvirtException
flags - flags for XML format options (set of virDomainXMLFlags)LibvirtExceptionpublic int isActive()
throws LibvirtException
LibvirtExceptionpublic int isPersistent()
throws LibvirtException
LibvirtExceptionpublic java.lang.String[] listVolumes()
throws LibvirtException
LibvirtExceptionpublic int numOfVolumes()
throws LibvirtException
LibvirtExceptionprotected void processError()
throws LibvirtException
LibvirtExceptionpublic void refresh(int flags)
throws LibvirtException
flags - flags to control refresh behaviour (currently unused, use 0)LibvirtExceptionpublic void setAutostart(int autostart)
throws LibvirtException
autostart - new flag settingLibvirtExceptionpublic StorageVol storageVolCreateXML(java.lang.String xmlDesc, int flags) throws LibvirtException
xmlDesc - description of volume to createflags - flags for creation (unused, pass 0)LibvirtExceptionpublic StorageVol storageVolCreateXMLFrom(java.lang.String xmlDesc, StorageVol cloneVolume, int flags) throws LibvirtException
null on error.LibvirtExceptionpublic StorageVol storageVolLookupByName(java.lang.String name) throws LibvirtException
name - name of storage volumeLibvirtExceptionpublic void undefine()
throws LibvirtException
LibvirtException