org.glassfish.virtualization.spi
Interface StoragePool


public interface StoragePool

Represents a storage pool, a serverPool of volumes.

Author:
Jerome Dochez

Method Summary
 StorageVol allocate(String name, long capacity)
          Allocates a new storage volume using the provided name and the capacity
 StorageVol byName(String name)
          Returns a storage volume given its name
 void delete()
          Deletes the storage pool
 Iterable<? extends StorageVol> volumes()
          Returns the currently configured volumes for this pool.
 

Method Detail

volumes

Iterable<? extends StorageVol> volumes()
                                       throws VirtException
Returns the currently configured volumes for this pool.

Returns:
an Iterable instance of volumes
Throws:
VirtException - if the connection to the underlying virtualization infrastructure failed.

byName

StorageVol byName(String name)
                  throws VirtException
Returns a storage volume given its name

Parameters:
name - of the volume
Returns:
the volume or null if not found
Throws:
VirtException - if the connection to the underlying virtualization infrastructure failed.

allocate

StorageVol allocate(String name,
                    long capacity)
                    throws VirtException
Allocates a new storage volume using the provided name and the capacity

Parameters:
name - name for the new volume
capacity - maximum capacity for the volume
Returns:
the volume
Throws:
VirtException - if the volume cannot be allocated.

delete

void delete()
            throws VirtException
Deletes the storage pool

Throws:
VirtException - if the volume cannot be deleted.


Copyright © 2012. All Rights Reserved.