org.glassfish.virtualization.spi
Interface Machine
public interface Machine
Represents a machine
- Author:
- Jerome Dochez
getConfig
MachineConfig getConfig()
getName
String getName()
getIpAddress
String getIpAddress()
getServerPool
PhysicalServerPool getServerPool()
getState
Machine.State getState()
getUser
VirtUser getUser()
execute
<T> T execute(MachineOperations<T> operations)
throws IOException
- Throws:
IOException
isUp
boolean isUp()
sleep
void sleep()
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
getVMs
Collection<? extends VirtualMachine> getVMs()
throws VirtException
- Throws:
VirtException
addStoragePool
StoragePool addStoragePool(String name,
long capacity)
throws VirtException
- Throws:
VirtException
getStoragePools
Map<String,? extends StoragePool> getStoragePools()
throws VirtException
- Throws:
VirtException
byName
VirtualMachine byName(String name)
throws VirtException
- Throws:
VirtException
create
PhasedFuture<AllocationPhase,VirtualMachine> create(TemplateInstance template,
VirtualCluster cluster,
EventSource<AllocationPhase> source)
throws VirtException,
IOException
- Allocate a new Virtual Machine on this machine.
- Parameters:
template - the template to use for the virtual machinecluster - the virtual cluster in which the virtual machine must be added
using the VirtualCluster#add(TemplateInstance, VirtualMachine) methodsource - the event notification mechanism
- Returns:
- a
PhasedFuture to obtain events and the virtual machine once ready
- Throws:
VirtException - if the virtualization layer cannot spawn the virtual machine
IOException - with any file handling.
install
void install(TemplateInstance template)
throws IOException
- Throws:
IOException
Copyright © 2012. All Rights Reserved.