Package lcmc.crm.ui.resource

Examples of lcmc.crm.ui.resource.ServiceInfo


    }

    public boolean atLeastOneDrbddiskConfigured() {
        mHeartbeatIdToServiceLock();
        for (final Map.Entry<String, ServiceInfo>serviceInfoEntry : heartbeatIdToServiceInfo.entrySet()) {
            final ServiceInfo si = serviceInfoEntry.getValue();
            if (si.getResourceAgent().isDrbddisk()) {
                mHeartbeatIdToServiceUnlock();
                return true;
            }
        }
        mHeartbeatIdToServiceUnlock();
View Full Code Here


    }

    public boolean isOneLinbitDrbdRaConfigured() {
        mHeartbeatIdToServiceLock();
        for (final Map.Entry<String, ServiceInfo> serviceInfoEntry : heartbeatIdToServiceInfo.entrySet()) {
            final ServiceInfo si = serviceInfoEntry.getValue();
            if (si.getResourceAgent().isLinbitDrbd()) {
                mHeartbeatIdToServiceUnlock();
                return true;
            }
        }
        mHeartbeatIdToServiceUnlock();
View Full Code Here

        treeMenuController.selectPath(new Object[]{treeTop, crmNode, servicesNode});
    }

    public ServiceInfo getServiceInfoFromCRMId(final String crmId) {
        mHeartbeatIdToServiceLock();
        final ServiceInfo serviceInfo = heartbeatIdToServiceInfo.get(crmId);
        mHeartbeatIdToServiceUnlock();
        return serviceInfo;
    }
View Full Code Here

        final Map<String, ServiceInfo> idToInfoHash = nameToServiceInfoHash.get(name);
        if (idToInfoHash == null) {
            unlockNameToServiceInfo();
            return null;
        }
        final ServiceInfo si = idToInfoHash.get(id);
        unlockNameToServiceInfo();
        return si;
    }
View Full Code Here

        final List<ServiceInfo> existingServiceList = new ArrayList<ServiceInfo>();
        lockNameToServiceInfo();
        for (final String name : nameToServiceInfoHash.keySet()) {
            final Map<String, ServiceInfo> idHash = nameToServiceInfoHash.get(name);
            for (final String id : idHash.keySet()) {
                final ServiceInfo si = idHash.get(id);
                if (si.getService().isOrphaned()) {
                    continue;
                }
                final GroupInfo gi = si.getGroupInfo();
                ServiceInfo sigi = si;
                if (gi != null) {
                    sigi = gi;
                    // TODO: it does not work here
                }
                if (p == null || !getCrmGraph().existsInThePath(sigi, p)) {
View Full Code Here

     * This is useful if something have changed.
     */
    public void resetFilesystems() {
        mHeartbeatIdToServiceLock();
        for (final String hbId : heartbeatIdToServiceInfo.keySet()) {
            final ServiceInfo si = heartbeatIdToServiceInfo.get(hbId);
            if (si.getName().equals("Filesystem")) {
                si.setInfoPanel(null);
            }
        }
        mHeartbeatIdToServiceUnlock();
    }
View Full Code Here

        /* add to the hash with service name and id as keys */
        final Service service = serviceInfo.getService();
        lockNameToServiceInfo();
        Map<String, ServiceInfo> idToInfoHash = nameToServiceInfoHash.get(service.getName());
        String csPmId = null;
        final ServiceInfo cs = serviceInfo.getContainedService();
        if (cs != null) {
            csPmId = cs.getService().getName() + '_' + cs.getService().getId();
        }
        if (idToInfoHash == null) {
            idToInfoHash = new TreeMap<String, ServiceInfo>(String.CASE_INSENSITIVE_ORDER);
            if (service.getId() == null) {
                if (csPmId == null) {
View Full Code Here

            public void run() {
                lockNameToServiceInfo();
                for (final String name : nameToServiceInfoHash.keySet()) {
                    final Map<String, ServiceInfo> idToInfoHash = nameToServiceInfoHash.get(name);
                    for (final Map.Entry<String, ServiceInfo> serviceEntry : idToInfoHash.entrySet()) {
                        final ServiceInfo si = serviceEntry.getValue();
                        if (si != exceptThisOne) {
                            si.reloadComboBoxes();
                        }
                    }
                }
                unlockNameToServiceInfo();
            }
View Full Code Here

    /** Returns when at least one resource in the list of resources can be
        promoted. */
    public boolean isOneMaster(final Iterable<String> rscs) {
        for (final String id : rscs) {
            mHeartbeatIdToServiceLock();
            final ServiceInfo si = heartbeatIdToServiceInfo.get(id);
            mHeartbeatIdToServiceUnlock();
            if (si == null) {
                continue;
            }
            if (si.getService().isMaster()) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

        final Set<ServiceInfo> parents = new TreeSet<ServiceInfo>();
        final Vertex v = getVertex(si);
        if (v != null) {
            lockGraph();
            for (final Vertex pV : getGraph().getPredecessors(v)) {
                final ServiceInfo psi = (ServiceInfo) getInfo(pV);
                if (psi != null) {
                    parents.add(psi);
                }
            }
            unlockGraph();
View Full Code Here

TOP

Related Classes of lcmc.crm.ui.resource.ServiceInfo

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.