Package org.rioproject.system

Examples of org.rioproject.system.ComputeResourceUtilization


        }
    }

    ComputeResourceUtilization getComputeResourceUtilization(
        ComputeResourceAdmin crAdmin, ServiceItem item) throws Throwable {
        ComputeResourceUtilization cru=null;
        try {
            cru = crAdmin.getComputeResourceUtilization();
        } catch(Throwable e) {
            if(ThrowableUtil.isRetryable(e)) {
                /* Rio 3.2 does not have the getComputeResourceUtilization method */
 
View Full Code Here


        Object value = null;
        if(column==0) {
            value = getName();
        } else {
            if(getComputeResourceUtilization()!=null) {
                ComputeResourceUtilization cru = getComputeResourceUtilization();
                value = columnValueHelper.getColumnValue(column, cru, false);
            }
        }
        return value;
    }
View Full Code Here

            for (Map.Entry<ServiceItem, CybernodeAdmin> mapEntry : tableSet) {
                ServiceItem item = mapEntry.getKey();
                Cybernode cybernode = (Cybernode)item.service;
                CybernodeAdmin cAdmin = mapEntry.getValue();
                try {
                    ComputeResourceUtilization cru = getComputeResourceUtilization(cAdmin, item);
                    cup.update(item, cAdmin, cru, utilizationColumnManager);
                } catch (Throwable e) {
                    if(!ThrowableUtil.isRetryable(e) &&
                       !(e instanceof NullPointerException)) {
                        removals.add(item);
View Full Code Here

     * set the compute resource utilization for a ServiceNode
     */
    private void setServiceNodeUtilization(final ServiceNode sNode, final CybernodeAdmin cAdmin) {
        if (sNode.isForked()) {
            try {
                ComputeResourceUtilization util = cAdmin.getComputeResourceUtilization(sNode.getUuid());
                sNode.setComputeResourceUtilization(util);
            } catch (RemoteException e) {
                e.printStackTrace();
            }
        }
View Full Code Here

     * @return A ComputeResourceUtilization object representing the utilization
     * of the ComputeResource
     */
    public ComputeResourceUtilization getComputeResourceUtilization() {
        MeasuredResource[] mrs = getMeasuredResources();
        ComputeResourceUtilization computeResourceUtilization =
            new ComputeResourceUtilization(getDescription(),
                                           getAddress().getHostName(),
                                           getAddress().getHostAddress(),
                                           getUtilization(mrs),
                                           Arrays.asList(mrs));
        return(computeResourceUtilization);
View Full Code Here

                logger.warn("Getting utilization for service [{}], terminating", association.getAssociationDescriptor(), e);
                terminate();
            }
            for(DeployedService deployed : list) {
                ServiceBeanInstance sbi = deployed.getServiceBeanInstance();
                ComputeResourceUtilization cru =
                    deployed.getComputeResourceUtilization();
                for(ServiceCapability sc : services) {
                    if(sc.uuid.equals(sbi.getServiceBeanID())) {
                        logger.trace("Obtained ComputeResourceUtilization for [{}]", association.getName());
                        sc.setComputeResourceUtilization(cru);
View Full Code Here

            mRes.add(memory.getMeasuredResource());
            mRes.add(cpu.getMeasuredResource());
        } else {
            mRes = Collections.unmodifiableList(new ArrayList<MeasuredResource>());
        }
        return new ComputeResourceUtilization("", "", "", mRes);
    }
View Full Code Here

            throw e;
        }
    }

    public ComputeResourceUtilization getComputeResourceUtilization() {
        ComputeResourceUtilization cru = null;
        if(sElem.forkService()) {
            try {
                cru  = execManager.getServiceBeanExecutor().getComputeResourceUtilization();
            } catch (RemoteException e) {
                logger.warn("Getting compute resource utilization failed for " +
View Full Code Here

                    ServiceBeanInstance jsbInstance = container.activate(event.getServiceElement(),
                                                                         opMgr,
                                                                         getSLAEventHandler());
                    loaderLogger.trace("Activated {}", ServiceLogUtil.logName(event));
                    ServiceBeanDelegate delegate = container.getServiceBeanDelegate(jsbInstance.getServiceBeanID());
                    ComputeResourceUtilization cru = null;
                    if(delegate!=null) {
                        cru = delegate.getComputeResourceUtilization();
                    }
                    deployedService = new DeployedService(event.getServiceElement(), jsbInstance, cru);
                    loaderLogger.trace("Created DeployedService for {}", ServiceLogUtil.logName(event));
View Full Code Here

    public ComputeResourceUtilization getComputeResourceUtilization() {
        return (backend.getComputeResource().getComputeResourceUtilization());
    }

    public ComputeResourceUtilization getComputeResourceUtilization(Uuid serviceUuid) {
        ComputeResourceUtilization cru = null;
        ServiceBeanDelegate delegate =
            backend.getServiceBeanContainer().getServiceBeanDelegate(serviceUuid);
        if(delegate!=null)
            cru = delegate.getComputeResourceUtilization();
        return cru; 
View Full Code Here

TOP

Related Classes of org.rioproject.system.ComputeResourceUtilization

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.