Rio Project 4.2 API Documentation



org.rioproject.cybernode
Class CybernodeAdminImpl

java.lang.Object
  extended by org.rioproject.resources.servicecore.ServiceAdminImpl
      extended by org.rioproject.cybernode.CybernodeAdminImpl
All Implemented Interfaces:
DestroyAdmin, Remote, JoinAdmin, ServerProxyTrust, ServiceBeanAdmin, CybernodeAdmin, ServiceBeanControl, ServiceAdmin, ComputeResourceAdmin

public class CybernodeAdminImpl
extends ServiceAdminImpl
implements CybernodeAdmin, ServerProxyTrust

The CybernodeAdminImpl class implements the ServiceAdmin interface providing administrative support for ServiceProducer implementations.

Author:
Dennis Reedy

Field Summary
 
Fields inherited from class org.rioproject.resources.servicecore.ServiceAdminImpl
adminProxy, exporter
 
Constructor Summary
CybernodeAdminImpl(CybernodeImpl service, Exporter exporter)
          Create a CybernodeAdminImpl
CybernodeAdminImpl(CybernodeImpl service, Exporter exporter, SnapshotHandler snapshotHandler)
          Create a CybernodeAdminImpl
 
Method Summary
 ComputeResourceUtilization getComputeResourceUtilization()
          Get the ComputeResourceUtilization for the compute resource
 ComputeResourceUtilization getComputeResourceUtilization(Uuid serviceUuid)
          Get the ComputeResourceUtilization for an instantiated service
 MeasuredResource[] getMeasuredResources()
          Get the MeasuredResource components for the ComputeResource
 boolean getPersistentProvisioning()
          Get whether the Cybernode supports persistent provisioning of qualitative capabilities
 PlatformCapability[] getPlatformCapabilties()
          Get the PlatformCapability components for the ComputeResource
 TrustVerifier getProxyVerifier()
           
 int getRegistryPort()
          Get the port that the Cybernode has started the RMI Registry on
 long getReportInterval()
          Get the reportInterval property which controls how often the ComputeResource will inform registered Observers of a state change.
 ResourceCapability getResourceCapability()
          Get the ResourceCapability for the compute resource
 ServiceAdmin getServiceAdmin()
          Override parents getServiceAdmin method
 Integer getServiceCount()
          Get the number of services that this Cybernode has instantiated
 Integer getServiceLimit()
          Get the upper limit of services that this Cybernode can instantiate
 SLA[] getSLAs()
          Get the system SLAs which provide control information for the MeasurableCapability components the ComputeResource contains
 double getUtilization()
          Get the resource's utilization.
 void setPersistentProvisioning(boolean support)
          Set whether the Cybernode supports persistent provisioning of qualitative capabilities
 void setReportInterval(long reportInterval)
          Set the reportInterval property which controls how often the ComputeResource will inform registered Observers of a state change.
 void setServiceLimit(Integer count)
          Set the upper limit of services that this Cybernode can instantiate
 boolean setSLA(SLA serviceLevelAgreement)
          Set the SLA for a MeasurableCapability contained within the ComputeResource
 
Methods inherited from class org.rioproject.resources.servicecore.ServiceAdminImpl
addLookupAttributes, addLookupGroups, addLookupLocators, advertise, destroy, getJoinSet, getLookupAttributes, getLookupGroups, getLookupLocators, getServiceBeanInstantiatorUuid, getServiceElement, getUpTime, modifyLookupAttributes, removeLookupGroups, removeLookupLocators, setLookupGroups, setLookupLocators, setServiceBeanContext, setServiceElement, start, stop, unadvertise, unexport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.rioproject.resources.servicecore.ServiceAdmin
getJoinSet
 
Methods inherited from interface org.rioproject.core.jsb.ServiceBeanAdmin
getServiceBeanInstantiatorUuid, getServiceElement, getUpTime, setServiceElement
 
Methods inherited from interface org.rioproject.jsb.ServiceBeanControl
advertise, start, stop, unadvertise
 
Methods inherited from interface net.jini.admin.JoinAdmin
addLookupAttributes, addLookupGroups, addLookupLocators, getLookupAttributes, getLookupGroups, getLookupLocators, modifyLookupAttributes, removeLookupGroups, removeLookupLocators, setLookupGroups, setLookupLocators
 
Methods inherited from interface com.sun.jini.admin.DestroyAdmin
destroy
 

Constructor Detail

CybernodeAdminImpl

public CybernodeAdminImpl(CybernodeImpl service,
                          Exporter exporter)
Create a CybernodeAdminImpl

Parameters:
service - Concrete implementation of a ServiceBeanAdapter
exporter - The Exporter to export this object

CybernodeAdminImpl

public CybernodeAdminImpl(CybernodeImpl service,
                          Exporter exporter,
                          SnapshotHandler snapshotHandler)
Create a CybernodeAdminImpl

Parameters:
service - The CybernodeImpl
exporter - The Exporter to export this object
snapshotHandler - The service's snapshot handler used for persistence
Method Detail

getServiceAdmin

public ServiceAdmin getServiceAdmin()
                             throws RemoteException
Override parents getServiceAdmin method

Overrides:
getServiceAdmin in class ServiceAdminImpl
Returns:
The ServiceAdmin
Throws:
RemoteException - if an communication errors occur

getServiceLimit

public Integer getServiceLimit()
Description copied from interface: CybernodeAdmin
Get the upper limit of services that this Cybernode can instantiate

Specified by:
getServiceLimit in interface CybernodeAdmin
Returns:
The upper limit of services

setServiceLimit

public void setServiceLimit(Integer count)
Description copied from interface: CybernodeAdmin
Set the upper limit of services that this Cybernode can instantiate

Specified by:
setServiceLimit in interface CybernodeAdmin
Parameters:
count - Integer indicating the upper limit of services

getServiceCount

public Integer getServiceCount()
Description copied from interface: CybernodeAdmin
Get the number of services that this Cybernode has instantiated

Specified by:
getServiceCount in interface CybernodeAdmin
Returns:
The number of services the Cybernode has instantiated

getRegistryPort

public int getRegistryPort()
Description copied from interface: CybernodeAdmin
Get the port that the Cybernode has started the RMI Registry on

Specified by:
getRegistryPort in interface CybernodeAdmin
Returns:
The port the Cybernode has started the RMI Registry on

getPersistentProvisioning

public boolean getPersistentProvisioning()
Description copied from interface: CybernodeAdmin
Get whether the Cybernode supports persistent provisioning of qualitative capabilities

Specified by:
getPersistentProvisioning in interface CybernodeAdmin
Returns:
True if the Cybernode supports persistent provisioning of qualitative capabilities otherwise return false

setPersistentProvisioning

public void setPersistentProvisioning(boolean support)
                               throws IOException
Description copied from interface: CybernodeAdmin
Set whether the Cybernode supports persistent provisioning of qualitative capabilities

Specified by:
setPersistentProvisioning in interface CybernodeAdmin
Parameters:
support - Set to true if the Cybernode supports persistent provisioning of qualitative capabilities otherwise, set false
Throws:
RemoteException - If communication errors happen
IOException

setSLA

public boolean setSLA(SLA serviceLevelAgreement)
Description copied from interface: ComputeResourceAdmin
Set the SLA for a MeasurableCapability contained within the ComputeResource

Specified by:
setSLA in interface ComputeResourceAdmin
Parameters:
serviceLevelAgreement - The SLA for the ComputeResource
Returns:
True if updated, false otherwise

getSLAs

public SLA[] getSLAs()
Description copied from interface: ComputeResourceAdmin
Get the system SLAs which provide control information for the MeasurableCapability components the ComputeResource contains

Specified by:
getSLAs in interface ComputeResourceAdmin
Returns:
The system SLA for each MeasurableCapability contained within the ComputeResource

getPlatformCapabilties

public PlatformCapability[] getPlatformCapabilties()
Description copied from interface: ComputeResourceAdmin
Get the PlatformCapability components for the ComputeResource

Specified by:
getPlatformCapabilties in interface ComputeResourceAdmin
Returns:
The PlatformCapability components for the ComputeResource

getMeasuredResources

public MeasuredResource[] getMeasuredResources()
Description copied from interface: ComputeResourceAdmin
Get the MeasuredResource components for the ComputeResource

Specified by:
getMeasuredResources in interface ComputeResourceAdmin
Returns:
Array of MeasuredResource instances that correspond to MeasurableCapability components

getUtilization

public double getUtilization()
Description copied from interface: ComputeResourceAdmin
Get the resource's utilization. ComputeResource quantitative behavior is represented by MeasurableCapability objects. MeasurableCapability objects produce a relative value which represents the percentage of the capability being measured. This value is referred to as a MeasurableCapability utilization. This method returns the aggregate of all computed utilizations

Specified by:
getUtilization in interface ComputeResourceAdmin
Returns:
The ComputeResource's utilization

getResourceCapability

public ResourceCapability getResourceCapability()
                                         throws RemoteException
Description copied from interface: ComputeResourceAdmin
Get the ResourceCapability for the compute resource

Specified by:
getResourceCapability in interface ComputeResourceAdmin
Returns:
The ResourceCapability for the compute resource. The ResourceCapability class provides the utilization, platform and measurable capabilities for a compute resource.
Throws:
RemoteException - If communication errors occur

getComputeResourceUtilization

public ComputeResourceUtilization getComputeResourceUtilization()
Description copied from interface: ComputeResourceAdmin
Get the ComputeResourceUtilization for the compute resource

Specified by:
getComputeResourceUtilization in interface ComputeResourceAdmin
Returns:
The ComputeResourceUtilization for the compute resource. This object represents a snapshot of the depletion-oriented resources on the compute resource. A new ComputeResourceUtilization is created each time this method is invoked

getComputeResourceUtilization

public ComputeResourceUtilization getComputeResourceUtilization(Uuid serviceUuid)
Description copied from interface: ComputeResourceAdmin
Get the ComputeResourceUtilization for an instantiated service

Specified by:
getComputeResourceUtilization in interface ComputeResourceAdmin
Parameters:
serviceUuid - The Uuid of an instantiated service
Returns:
The ComputeResourceUtilization for the service identified by the serviceUuid. If the identified service is contained within the Cybernode, the returned ComputeResourceUtilization will be the same as the value returned from ComputeResourceAdmin.getComputeResourceUtilization().

If the identified service has been executed in it's own process, the returned value will represent the ComputeResourceUtilization for that process.

If no instantiated service can be found, a null is returned.


getReportInterval

public long getReportInterval()
Description copied from interface: ComputeResourceAdmin
Get the reportInterval property which controls how often the ComputeResource will inform registered Observers of a state change. A state change is determined if any of the MeasurableCapability components contained within this ComputeResource provide an update in the interval specified by the reportInterval property

Specified by:
getReportInterval in interface ComputeResourceAdmin
Returns:
The interval controlling when the ComputeResource reports change of state

setReportInterval

public void setReportInterval(long reportInterval)
Description copied from interface: ComputeResourceAdmin
Set the reportInterval property which controls how often the ComputeResource will inform registered Observers of a state change. A state change is determined if any of the MeasurableCapability components contained within this ComputeResource provide an update in the interval specified by the reportInterval property.

Note: MeasurableCapability components contained within the ComputeResource may have reportRates greater than then the reportInterval. If this is the case, the ComputeResource will only report state changes if the values reported by the contained MeasurableCapability objects change.

Specified by:
setReportInterval in interface ComputeResourceAdmin
Parameters:
reportInterval - The interval controlling when the ComputeResource reports change of state to registered Observers

getProxyVerifier

public TrustVerifier getProxyVerifier()
                               throws RemoteException
Specified by:
getProxyVerifier in interface ServerProxyTrust
Throws:
RemoteException

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.