|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.monitor.ProvisionMonitorImpl.OpStringManager
public class ProvisionMonitorImpl.OpStringManager
The OpStringManager provides the management for an OperationalString that has been deployed to the ProvisionMonitor
| Constructor Summary | |
|---|---|
ProvisionMonitorImpl.OpStringManager(OperationalString opString,
ProvisionMonitorImpl.OpStringManager parent,
boolean mode,
Configuration config)
Create an OpStringManager, making it available to receive incoming calls supporting the OperationalStringManager interface |
|
| 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 recommended,
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. |
TrustVerifier |
getProxyVerifier()
Returns a TrustVerifier which can be used to verify that a
given proxy to this policy handler can be trusted |
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 newActive)
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 newOpString)
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProvisionMonitorImpl.OpStringManager(OperationalString opString,
ProvisionMonitorImpl.OpStringManager parent,
boolean mode,
Configuration config)
throws RemoteException
opString - The OperationalString to manageparent - The OpStringManager parent. May be nullmode - Whether the OperationalStringManager is the active managerconfig - Configuration object
RemoteException - if the OpStringManager cannot export itself| Method Detail |
|---|
public void setManaging(boolean newActive)
OperationalStringManager
setManaging in interface OperationalStringManagernewActive - 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.OperationalStringManager.setManaging(boolean)public boolean isManaging()
OperationalStringManager
isManaging in interface OperationalStringManagerOperationalStringManager.isManaging()public Date[] getDeploymentDates()
OperationalStringManager
getDeploymentDates in interface OperationalStringManagerOperationalStringManager.getDeploymentDates()
public Map<String,Throwable> update(OperationalString newOpString)
throws OperationalStringException,
RemoteException
OperationalStringManager
update in interface OperationalStringManagernewOpString - The OperationalString to update
OperationalStringException - If there are problems updating the
the OperationalString
RemoteException - If communication errors happenOperationalStringManager.update(org.rioproject.core.OperationalString)
public void addServiceElement(ServiceElement sElem)
throws OperationalStringException
OperationalStringManager
addServiceElement in interface OperationalStringManagersElem - The ServiceElement to add
OperationalStringException - If the service described by the
ServiceElement already exists, or there are problems adding the
ServiceElement
public void addServiceElement(ServiceElement sElem,
ServiceProvisionListener listener)
throws OperationalStringException
OperationalStringManager
addServiceElement in interface OperationalStringManagersElem - 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
public void removeServiceElement(ServiceElement sElem,
boolean destroy)
throws OperationalStringException
OperationalStringManager
removeServiceElement in interface OperationalStringManagersElem - 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
public void update(ServiceElement sElem)
throws OperationalStringException
OperationalStringManager
update in interface OperationalStringManagersElem - The ServiceElement to update
OperationalStringException - If there are problems updating the
ServiceElement
public void relocate(ServiceBeanInstance instance,
ServiceProvisionListener listener,
Uuid uuid)
throws OperationalStringException,
RemoteException
OperationalStringManagerServiceBeanInstantiator. If the
relocating request cannot be carried out, the request will not be
submitted for future processing.
relocate in interface OperationalStringManagerinstance - 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
RemoteException - If communication errors occur
public void update(ServiceBeanInstance instance)
throws OperationalStringException
OperationalStringManager
update in interface OperationalStringManagerinstance - 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
public void increment(ServiceElement sElem,
boolean permanent,
ServiceProvisionListener listener)
throws OperationalStringException,
RemoteException
OperationalStringManagerServiceProvisionListener 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
increment in interface OperationalStringManagersElem - 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 occurpublic int getPendingCount(ServiceElement sElem)
OperationalStringManagerServiceElement.ProvisionType.DYNAMIC.
Any other provisiontype will be ignored
getPendingCount in interface OperationalStringManagersElem - 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
public int trim(ServiceElement sElem,
int trimUp)
throws OperationalStringException
OperationalStringManagerServiceElement.ProvisionType.DYNAMIC. Any other
provision type will be ignored
trim in interface OperationalStringManagersElem - 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
public void decrement(ServiceBeanInstance instance,
boolean recommended,
boolean destroy)
throws OperationalStringException
OperationalStringManager
decrement in interface OperationalStringManagerinstance - The ServiceBeanInstancerecommended - 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 OperationalStringManagerpublic OperationalString getOperationalString()
OperationalStringManager
getOperationalString in interface OperationalStringManagerpublic ServiceElement getServiceElement(Object proxy)
OperationalStringManager
getServiceElement in interface OperationalStringManagerproxy - The proxy for the Service
public ServiceBeanInstance[] getServiceBeanInstances(ServiceElement sElem)
throws OperationalStringException
OperationalStringManager
getServiceBeanInstances in interface OperationalStringManagersElem - The ServiceElement
OperationalStringException - If the ServiceElement is unknown to the
OperationalStringManager
public ServiceElement getServiceElement(String[] interfaces,
String name)
OperationalStringManager
getServiceElement in interface OperationalStringManagerinterfaces - Array of interface (or proxy) classes the service
implements as an array of String objectsname - The name of the Service
public void redeploy(ServiceElement sElem,
ServiceBeanInstance instance,
boolean clean,
long delay,
ServiceProvisionListener listener)
throws OperationalStringException
OperationalStringManager
redeploy in interface OperationalStringManagersElem - 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 redeployingOperationalStringManager.redeploy(org.rioproject.core.ServiceElement, org.rioproject.core.ServiceBeanInstance, boolean, long, org.rioproject.core.ServiceProvisionListener)
public void redeploy(ServiceElement sElem,
ServiceBeanInstance instance,
boolean clean,
boolean sticky,
long delay,
ServiceProvisionListener listener)
throws OperationalStringException
OperationalStringManager
redeploy in interface OperationalStringManagersElem - 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 redeployingOperationalStringManager.redeploy(org.rioproject.core.ServiceElement, org.rioproject.core.ServiceBeanInstance, boolean, long, org.rioproject.core.ServiceProvisionListener)public ServiceStatement[] getServiceStatements()
OperationalStringManagerServiceStatements for
all ServiceElements in the OperationalString
getServiceStatements in interface OperationalStringManagerOperationalStringManager.getServiceStatements()public DeploymentMap getDeploymentMap()
OperationalStringManagerDeploymentMap for services in this OperationalString
getDeploymentMap in interface OperationalStringManagerDeploymentMap for services in this OperationalStringOperationalStringManager.getDeploymentMap()public TrustVerifier getProxyVerifier()
TrustVerifier which can be used to verify that a
given proxy to this policy handler can be trusted
getProxyVerifier in interface ServerProxyTrust
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||