Package org.rioproject.system.capability.platform

Examples of org.rioproject.system.capability.platform.StorageCapability


                                                          "systemCapabilitiesLoader",
                                                          SystemCapabilitiesLoader.class,
                                                          new SystemCapabilities());
            /* Get the PlatformCapability instances */
            PlatformCapability[] pCaps = systemCapabilitiesLoader.getPlatformCapabilities(config);
            StorageCapability storage = null;
            org.rioproject.system.capability.platform.Memory memory = null;
            org.rioproject.system.capability.platform.SystemMemory systemMemory = null;
            for (PlatformCapability pCap : pCaps) {
                if (pCap instanceof StorageCapability) {
                    storage = (StorageCapability) pCap;
View Full Code Here


     */
     boolean supportsStorageRequirement(int requestedSize, PlatformCapability[] pCaps) {
        boolean supports = false;
        for (PlatformCapability pCap : pCaps) {
            if (pCap instanceof StorageCapability) {
                StorageCapability storage = (StorageCapability) pCap;
                supports = storage.supports(requestedSize);
                break;
            }
        }
        return (supports);
    }
View Full Code Here

     */
    double getAvailableStorage(PlatformCapability[] pCaps) {
        double available = -1;
        for (PlatformCapability pCap : pCaps) {
            if (pCap instanceof StorageCapability) {
                StorageCapability storage = (StorageCapability) pCap;
                Double dCap = (Double) storage.getValue(StorageCapability.CAPACITY);
                if (dCap != null) {
                    available = dCap;
                }
                break;
            }
View Full Code Here

TOP

Related Classes of org.rioproject.system.capability.platform.StorageCapability

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.