org.glassfish.virtualization.spi
Interface ServerPoolAllocationStrategy


public interface ServerPoolAllocationStrategy

Represents a strategy for allocating virtual machines within a pool of servers.

Author:
Jerome Dochez

Method Summary
 PhasedFuture<AllocationPhase,VirtualMachine> allocate(AllocationConstraints constraints, EventSource<AllocationPhase> source)
          Allocates a virtual machine using the passed allocation characteristics
 PhysicalServerPool getServerPool()
          Returns the ServerPool instance this strategy is serving.
 

Method Detail

getServerPool

PhysicalServerPool getServerPool()
Returns the ServerPool instance this strategy is serving.

Returns:
the target server pool instance.

allocate

PhasedFuture<AllocationPhase,VirtualMachine> allocate(AllocationConstraints constraints,
                                                      EventSource<AllocationPhase> source)
                                                      throws VirtException
Allocates a virtual machine using the passed allocation characteristics

Parameters:
constraints - the requested virtual machine allocation characteristics
source - a facility to register events listeners for allocation phases.
Returns:
the PhasedFuture instance giving access to the VirtualMachine
Throws:
VirtException - if the allocation is not successful.


Copyright © 2012. All Rights Reserved.