|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface OperationalStringManager
The OperationalStringManager defines the semantics for a service that can manage OperationalString objects
OperationalString,
ServiceElement| Method Summary | |
|---|---|
void |
addServiceElement(ServiceElement sElem)
This method will add a ServiceElement to an OperationalString. |
void |
addServiceElement(ServiceElement sElem,
ServiceProvisionListener listener)
This method will add a ServiceElement to an OperationalString. |
void |
decrement(ServiceBeanInstance instance,
boolean mandate,
boolean destroy)
Decrement (decrease the number of) and remove a specific ServiceBean instance from the OperationalString. |
Date[] |
getDeploymentDates()
Get the deployment Date history |
DeploymentMap |
getDeploymentMap()
Get the DeploymentMap for services in this OperationalString |
OperationalString |
getOperationalString()
Get the OperationalString the OperationalStringManager is managing |
int |
getPendingCount(ServiceElement sElem)
Get the number of pending service provision requests. |
ServiceBeanInstance[] |
getServiceBeanInstances(ServiceElement sElem)
Get the ServiceBeanInstance objects for a ServiceElement |
ServiceElement |
getServiceElement(Object proxy)
This method returns the ServiceElement object for a requested service based on a service's proxy |
ServiceElement |
getServiceElement(String[] interfaces,
String name)
This method returns the ServiceElement object for a requested service based on the array of interface (or proxy) classes the service implements as an array of String objects and an optional service name. |
ServiceStatement[] |
getServiceStatements()
Get the ServiceStatements for
all ServiceElements in the OperationalString |
void |
increment(ServiceElement sElem,
boolean permanent,
ServiceProvisionListener listener)
Increment (increase) the number of instances by one. |
boolean |
isManaging()
Whether the OperationalStringManager is the active managing OperationalStringManager for the OperationalString. |
void |
redeploy(ServiceElement sElem,
ServiceBeanInstance instance,
boolean clean,
boolean sticky,
long delay,
ServiceProvisionListener listener)
Redeploy an OperationalString, ServiceElement or ServiceBeanInstance. |
void |
redeploy(ServiceElement sElem,
ServiceBeanInstance instance,
boolean clean,
long delay,
ServiceProvisionListener listener)
Redeploy an OperationalString, ServiceElement or ServiceBeanInstance. |
void |
relocate(ServiceBeanInstance instance,
ServiceProvisionListener listener,
Uuid uuid)
Relocate (move) a ServiceBean instance to another ServiceBeanInstantiator. |
void |
removeServiceElement(ServiceElement sElem,
boolean destroy)
This method will remove a ServiceElement from an OperationalString and optionally terminate all service instances that have been provisioned from the ServiceElement description |
void |
setManaging(boolean active)
Set the OperationalStringManager managing status based on the active parameter |
int |
trim(ServiceElement sElem,
int trimUp)
Trim (remove) service provision requests which are pending allocation. |
Map<String,Throwable> |
update(OperationalString opstring)
Update the OperationalString that the OperationalStringManager is managing. |
void |
update(ServiceBeanInstance instance)
Update a ServiceBeanInstance |
void |
update(ServiceElement sElem)
This method will modify the ServiceElement attributes of a ServiceElement in the OperationalStringManager. |
| Method Detail |
|---|
OperationalString getOperationalString()
throws RemoteException
RemoteException - If communication errors occur
boolean isManaging()
throws RemoteException
RemoteException - If communication errors happen
void setManaging(boolean active)
throws RemoteException
active - If true, the OperationalStringManager is the active
managing OperationalStringManager for the OperationalString. The managing
OperationalStringManager will actively respond to scenarios where
service's contained within this OperationalString need to be allocated,
updated, relocated, removed or added. If the OperationalStringManager is
not the managing OperationalStringManager, it will observe and record
OperationalString transitions but not act on them.
RemoteException - If communication errors happen
Date[] getDeploymentDates()
throws RemoteException
RemoteException - If communication errors happen
Map<String,Throwable> update(OperationalString opstring)
throws OperationalStringException,
RemoteException
opstring - The OperationalString to update
OperationalStringException - If there are problems updating the
the OperationalString
RemoteException - If communication errors happen
ServiceElement getServiceElement(Object proxy)
throws RemoteException
proxy - The proxy for the Service
RemoteException - If communication errors occur
ServiceElement getServiceElement(String[] interfaces,
String name)
throws RemoteException
interfaces - Array of interface (or proxy) classes the service
implements as an array of String objectsname - The name of the Service
RemoteException - If communication errors occur
void addServiceElement(ServiceElement sElem)
throws OperationalStringException,
RemoteException
sElem - The ServiceElement to add
OperationalStringException - If the service described by the
ServiceElement already exists, or there are problems adding the
ServiceElement
RemoteException - If communication errors occur
void addServiceElement(ServiceElement sElem,
ServiceProvisionListener listener)
throws OperationalStringException,
RemoteException
sElem - The ServiceElement to addlistener - If not null, the
ServiceProvisionListener will be
notified on the result of the attempt to instantiate each service
instance.
OperationalStringException - If the service described by the
ServiceElement already exists, or there are problems adding the
ServiceElement
RemoteException - If communication errors occur
void update(ServiceElement sElem)
throws OperationalStringException,
RemoteException
sElem - The ServiceElement to update
OperationalStringException - If there are problems updating the
ServiceElement
RemoteException - If communication errors occur
void removeServiceElement(ServiceElement sElem,
boolean destroy)
throws OperationalStringException,
RemoteException
sElem - The ServiceElement to removedestroy - If true, destroy all services upon removal, otherwise
just remove
OperationalStringException - If the ServiceElement is null or not
being managed by the OperationalStringManager
RemoteException - If communication errors occur
ServiceBeanInstance[] getServiceBeanInstances(ServiceElement sElem)
throws OperationalStringException,
RemoteException
sElem - The ServiceElement
OperationalStringException - If the ServiceElement is unknown to the
OperationalStringManager
RemoteException - If communication errors occur
void relocate(ServiceBeanInstance instance,
ServiceProvisionListener listener,
Uuid uuid)
throws OperationalStringException,
RemoteException
ServiceBeanInstantiator. If the
relocating request cannot be carried out, the request will not be
submitted for future processing.
instance - The ServiceBeanInstance to relocatelistener - If not null, the
ServiceProvisionListener will be
notified on the result of the attempt to relocate the service instance.uuid - The Uuid of the
ServiceBeanInstantiator (Cybernode)
to relocate to. If this parameter is null, the OperationalStringManager
will determine a suitable compute resource
OperationalStringException - If the ServiceElement is not being
managed by the OperationalStringManager, or the service requesting
relocation is not a
ServiceElement.ProvisionType.DYNAMIC service
NullPointerException - if the instance is null
RemoteException - If communication errors occur
void increment(ServiceElement sElem,
boolean permanent,
ServiceProvisionListener listener)
throws OperationalStringException,
RemoteException
ServiceProvisionListener parameter is not null,
the ServiceProvisionListener will be notified of
the result. Additionally if the increment request cannot be carried
out, the request will be submitted for future processing
sElem - The ServiceElement instance to increment. This parameter
is used to match a ServiceElement being managed by the
OperationalStringManagerpermanent - If the increment request should be considered permanent. If
set to false, the number of service instances may vary over timelistener - If not null, the ServiceProvisionListener will be
notified on the result of the attempt to increment the amount of service
instances.
OperationalStringException - If the ServiceElement is not being
managed by the OperationalStringManager (or the OperationalStringManager
is not the managing OperationalStringManager for the OperationalString)
RemoteException - If communication errors occur
void decrement(ServiceBeanInstance instance,
boolean mandate,
boolean destroy)
throws OperationalStringException,
RemoteException
instance - The ServiceBeanInstancemandate - The mandate parameter is processed as follows:
destroy - If true, destroy the ServiceBean upon decrementing, otherwise
just remove the service instance from being a managed service.
OperationalStringException - If the ServiceElement is not being
managed by the OperationalStringManager
RemoteException - If communication errors occur
int getPendingCount(ServiceElement sElem)
throws RemoteException
ServiceElement.ProvisionType.DYNAMIC.
Any other provisiontype will be ignored
sElem - The ServiceElement instance to query. This parameter
is used to match a ServiceElement being managed by the
OperationalStringManager
ServiceElement.ProvisionType.DYNAMIC
OperationalStringManager is not
the managing OperationalStringManager, -1 will be returned
RemoteException - If communication errors occur
int trim(ServiceElement sElem,
int trimUp)
throws OperationalStringException,
RemoteException
ServiceElement.ProvisionType.DYNAMIC. Any other
provision type will be ignored
sElem - The ServiceElement instance to
trim. This parameter is used to match a ServiceElement being
managed by the OperationalStringManagertrimUp - The number of pending requests to trim. The number of
pending requests to trim will be determined as follows :
Math.min((planned-actual), trimUp)
ServiceElement.ProvisionType.DYNAMIC, -1 will
be returned
OperationalStringException - If the ServiceElement is not being
managed by the OperationalStringManager
RemoteException - If communication errors occur
void update(ServiceBeanInstance instance)
throws OperationalStringException,
RemoteException
instance - The ServiceBeanInstance to update. The configuration
and properties of the instance are updated, ensuring if the instance
is (re-)allocated or relocated, the settings are applied to the new i
nstance.
OperationalStringException - If the ServiceElement is not being
managed by the OperationalStringManager
RemoteException - If communication errors occur
void redeploy(ServiceElement sElem,
ServiceBeanInstance instance,
boolean clean,
long delay,
ServiceProvisionListener listener)
throws OperationalStringException,
RemoteException
sElem - If not null, the ServiceElement to redeployinstance - If not null, and the sElem param is not null, the
ServiceBeanInstance to redeployclean - If set to true, the service will be allocated using the
ServiceElement configuration, not the ServiceBeanInstance configurationdelay - The amount of time (in milliseconds) to wait until the
redeployment is performed. A value > 0 will result in scheduling the
redeploymentlistener - If not null, the ServiceProvisionListener will be
notified as each service is redeployed
OperationalStringException - If there are errors redeploying
RemoteException - If communication errors occur
void redeploy(ServiceElement sElem,
ServiceBeanInstance instance,
boolean clean,
boolean sticky,
long delay,
ServiceProvisionListener listener)
throws OperationalStringException,
RemoteException
sElem - If not null, the ServiceElement to redeployinstance - If not null, and the sElem param is not null, the
ServiceBeanInstance to redeployclean - If set to true, the service will be allocated using the
ServiceElement configuration, not the ServiceBeanInstance configurationsticky - If set to true, the service(s) will be re-allocated to the
same ServiceBeanInstantiator that
had instantiated the service. If the service has requirements that cannot be
met by the compute resource hosting the
ServiceBeanInstantiator, the
service will be allocated on the next available compute resource that
meets the requirements of the service.delay - The amount of time (in milliseconds) to wait until the
redeployment is performed. A value > 0 will result in scheduling the
redeploymentlistener - If not null, the ServiceProvisionListener will be
notified as each service is redeployed
OperationalStringException - If there are errors redeploying
RemoteException - If communication errors occur
ServiceStatement[] getServiceStatements()
throws RemoteException
ServiceStatements for
all ServiceElements in the OperationalString
RemoteException - If communication errors occur
DeploymentMap getDeploymentMap()
throws RemoteException
DeploymentMap for services in this OperationalString
DeploymentMap for services in this OperationalString
RemoteException - If communication errors occur
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||