org.ow2.jasmine.vmm.agent.domain.policy
Class PolicyRegistry

java.lang.Object
  extended by org.ow2.jasmine.vmm.agent.domain.policy.PolicyRegistry

public final class PolicyRegistry
extends java.lang.Object

The PolicyRegistry is a singleton class which acts as a factory of VM placement policies. A VM placement policy can be specified through an user-friendly policy Id in a domain XML configuration file. The mapping between theses aliases and Java classes is resolved by a a property file (etc/vm_placement_map.properties).


Method Summary
static PolicyRegistry getInstance()
          Returns the single PolicyRegistry instance
 VMPlacementPolicy newDefaultPolicy()
          Returns the default VM placement policy
 VMPlacementPolicy newPolicy(java.lang.String policyId)
          Returns the VM placement policy corresponding to the provided policy Id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PolicyRegistry getInstance()
Returns the single PolicyRegistry instance

Returns:

newPolicy

public VMPlacementPolicy newPolicy(java.lang.String policyId)
Returns the VM placement policy corresponding to the provided policy Id

Parameters:
policyId - the policy Id of the VM placement policy to create
Returns:

newDefaultPolicy

public VMPlacementPolicy newDefaultPolicy()
Returns the default VM placement policy

Returns:


Copyright © 2009 OW2 Consortium. All Rights Reserved.