Public Member Functions | |
| ResourceInstance | deployService (IService resJava) throws ProvisionException |
| Used to put a service on a framework entity and exposed as a Service. | |
| List< ResourceInstance > | forceProvisionResourcesOnAllNodes (String stResource) throws ProvisionException |
| Forces the provisioning (a new instance creation) of resource resourceName on all available nodes (with the resourceName plugin loaded). | |
Protected Member Functions | |
| GridResourceProvider (IGridAccess inAccess, FrameworkConfiguration inConfig) | |
| class constructor used from Grid to expose its functionalities. | |
| List< ResourceInstance > | forceProvisionResources (String resourceName, int numReso) throws ProvisionException |
| Require the creation of numReso new instances (provisioning) for the resource resourceName. | |
| List< ResourceInstance > | forceProvisionResources (String resourceName, int numReso, String nodeName) throws ProvisionException |
| Similar to getResources but requiring new instances. | |
| ResourceInstance | getResource (String resourceName) throws NoEnoughResourcesException |
| Obtains a reference to SOME resource resourceName. | |
| ResourceInstance | getResource (String resourceName, String nodeName) throws ProvisionException |
| Obtains a reference to some resource of class resourceName and located on the nodeName. | |
| List< ResourceInstance > | getResources (String stResource, int numReso) throws NoEnoughResourcesException, FrameworkException |
| The same as getResource(String) but we can specify how many instances we would like to get. | |
| Iterator< ResourceInstance > | getResourceSequence (String resourceName) |
| A ranking sorted access to obtain resources instances. | |
Implements transactions to get Resources. Resolve and provisioning messages request construction and response unwrapping.
Note: on this version all ResourceInstance created are Transient (not volatile) and Public, so resources access could be shared throw different uses and users.
| com.abiquo.GridResourceProvider.GridResourceProvider | ( | IGridAccess | inAccess, | |
| FrameworkConfiguration | inConfig | |||
| ) | [protected] |
class constructor used from Grid to expose its functionalities.
| inAccess | the in access | |
| inConfig | the in config |
| ResourceInstance com.abiquo.GridResourceProvider.deployService | ( | IService | resJava | ) | throws ProvisionException |
Used to put a service on a framework entity and exposed as a Service.
It define the new Resource (as mw do with its plugins) and require a new instance (provisioning)
| ProvisionException | some error on class serialization |
| List<ResourceInstance> com.abiquo.GridResourceProvider.forceProvisionResources | ( | String | resourceName, | |
| int | numReso | |||
| ) | throws ProvisionException [protected] |
Require the creation of numReso new instances (provisioning) for the resource resourceName.
Use scheduler to select on witch nodes are created.
| resourceName | the resource name required (use XXXResource.ID) | |
| numReso | how many new instances are required |
| ProvisionException | if there aren't any resource to book or there are too many instances of this resource |
| List<ResourceInstance> com.abiquo.GridResourceProvider.forceProvisionResources | ( | String | resourceName, | |
| int | numReso, | |||
| String | nodeName | |||
| ) | throws ProvisionException [protected] |
Similar to getResources but requiring new instances.
nodeName can be null indicating that it's not a problem. nodeName only make sense when numReso = 1. Else it indicates provision on the same node different resource instances.
| resourceName | the resource type | |
| numReso | the num reso | |
| nodeName | the force FQDN |
| ProvisionException,if | there aren't any resource to book. | |
| ProvisionException | the just cant get resource exception |
| List<ResourceInstance> com.abiquo.GridResourceProvider.forceProvisionResourcesOnAllNodes | ( | String | stResource | ) | throws ProvisionException |
Forces the provisioning (a new instance creation) of resource resourceName on all available nodes (with the resourceName plugin loaded).
| resourceName | is the resource type (abstract name of the resource instance) |
| ProvisionException | if there aren't any resource to book or there are too many instances of this resource |
| ResourceInstance com.abiquo.GridResourceProvider.getResource | ( | String | resourceName | ) | throws NoEnoughResourcesException [protected] |
Obtains a reference to SOME resource resourceName.
Use the scheduler to select the instance to return. allocated in any node of the grid depending on efficiency constraints. First try to reuse some living instance (previously provisioned) then require the creation of new instance.
| resourceName | is the resource type (abstract name of the resource instance) |
| NoEnoughResourcesException,when | there isn't any resource resourceName available (or too many) |
| ResourceInstance com.abiquo.GridResourceProvider.getResource | ( | String | resourceName, | |
| String | nodeName | |||
| ) | throws ProvisionException [protected] |
Obtains a reference to some resource of class resourceName and located on the nodeName.
It could reuse an existing resource or force its creation (provisioned).
| resourceName | is the resource type (abstract name of the resource instance) | |
| nodeName | the node locator (alias, address or session name) |
| ProvisionException | when the node on nodeName can not instantiate this resource (have not the plugin or too many instances) |
| List<ResourceInstance> com.abiquo.GridResourceProvider.getResources | ( | String | stResource, | |
| int | numReso | |||
| ) | throws NoEnoughResourcesException, FrameworkException [protected] |
The same as getResource(String) but we can specify how many instances we would like to get.
Resolution if it's necessary, it tries force provisioning.
| resourceName | is the resource type (abstract name of the resource instance) | |
| numReso | the number of resources to find. |
| NoEnoughResourcesException | when there isn't enough resources |
| Iterator<ResourceInstance> com.abiquo.GridResourceProvider.getResourceSequence | ( | String | resourceName | ) | [protected] |
A ranking sorted access to obtain resources instances.
Used to provision on the fly, when is better to peek a resource instance each time you need it (better than allocate first then use). Use the scheduler ranking.
| resourceName | is the resource type (abstract name of the resource instance) |
1.5.5