Package lcmc.crm.ui.resource

Examples of lcmc.crm.ui.resource.ServiceInfo


        }
        unlockGraph();

        for (final Edge e : edges) {
            final Pair<Vertex> p = getGraph().getEndpoints(e);
            final ServiceInfo s1 = (ServiceInfo) getInfo(p.getSecond());
            if (s1 == null) {
                continue;
            }
            final ServiceInfo s2 = (ServiceInfo) getInfo(p.getFirst());
            if (s2 == null) {
                continue;
            }
            if (!keepEdgeIsOrderList.contains(e)) {
                edgeIsOrderList.remove(e);
            }
            if (!keepEdgeIsColocationList.contains(e)) {
                edgeIsColocationList.remove(e);
            }
            if (s1.getService().isNew() && !s1.getService().isRemoved()
                || (s2.getService().isNew() && !s2.getService().isRemoved())) {
                continue;
            }
            if (!keepEdgeIsOrderList.contains(e)) {
                mHbConnectionReadLock.lock();
                final HbConnectionInfo hbci;
View Full Code Here


                    }
                }
                cphi.resetRscSetConnectionData();
            } else {
                if (!vipl.contains(v)) {
                    final ServiceInfo si = (ServiceInfo) getInfo(v);
                    if (si != null && !si.getService().isNew() && !getClusterBrowser().crmStatusFailed()) {
                        si.setUpdated(false);
                        getVertexLocations().put(v, null);
                        putVertexLocations();
                        lockGraph();
                        getGraph().removeVertex(v);
                        removeInfo(v);
                        removeVertex(si);
                        unlockGraph();
                        si.removeInfo();
                        //TODO: unregister removePopup(v);
                        getVertexToMenus().remove(v);
                        vertexToAddServiceMap.remove(v);
                        vertexToAddExistingServiceMap.remove(v);
                        //TODO: positions are still there
View Full Code Here

            return icons;
        } else if (vertexToConstraintPHMap.containsKey(v)) {
            return null;
        }

        final ServiceInfo si = (ServiceInfo) getInfo(v);
        if (si == null) {
            return null;
        }
        if (si.isFailed(runMode)) {
            if (si.isRunning(runMode)) {
                icons.add(SERVICE_RUNNING_FAILED_ICON);
            } else {
                icons.add(SERVICE_STOPPED_FAILED_ICON);
            }
        } else if (si.isStopped(runMode) || getClusterBrowser().allHostsWithoutClusterStatus()) {
            if (si.isRunning(runMode)) {
                icons.add(SERVICE_STOPPING_ICON);
            } else {
                icons.add(SERVICE_STOPPED_ICON);
            }
        } else {
            if (si.isRunning(runMode)) {
                icons.add(SERVICE_RUNNING_ICON);
            } else {
                icons.add(SERVICE_STARTED_ICON);
            }
        }
        if (!si.isManaged(runMode) || si.getService().isOrphaned()) {
            icons.add(SERVICE_UNMANAGED_ICON);
        }
        if (si.getMigratedTo(runMode) != null || si.getMigratedFrom(runMode) != null) {
            icons.add(SERVICE_MIGRATED_ICON);
        }
        return icons;
    }
View Full Code Here

        }
    }

    /** Removes the connection, the order, the colocation or both. */
    public void removeConnection(final HbConnectionInfo hbci, final Host dcHost, final Application.RunMode runMode) {
        final ServiceInfo siP = hbci.getLastServiceInfoParent();
        final ServiceInfo siC = hbci.getLastServiceInfoChild();
        mHbConnectionReadLock.lock();
        final Edge edge;
        try {
            edge = hbconnectionToEdgeMap.get(hbci);
        } finally {
            mHbConnectionReadLock.unlock();
        }
        if (edgeIsOrderList.contains(edge)) {
            siC.removeOrder(siP, dcHost, runMode);
        }
        final ServiceInfo siRsc = hbci.getLastServiceInfoRsc();
        final ServiceInfo siWithRsc = hbci.getLastServiceInfoWithRsc();
        if (edgeIsColocationList.contains(edge)) {
            if (Application.isLive(runMode)) {
                edgeIsOrderList.remove(edge);
                edgeIsColocationList.remove(edge);
                keepEdgeIsOrderList.remove(edge);
View Full Code Here

    public void removeOrder(final HbConnectionInfo hbci, final Host dcHost, final Application.RunMode runMode) {
        if (hbci == null) {
            return;
        }
        final ServiceInfo siP = hbci.getLastServiceInfoParent();
        final ServiceInfo siC = hbci.getLastServiceInfoChild();
        mHbConnectionReadLock.lock();
        final Edge edge;
        try {
            edge = hbconnectionToEdgeMap.get(hbci);
        } finally {
            mHbConnectionReadLock.unlock();
        }
        if (edgeIsOrderList.contains(edge)) {
            if (Application.isLive(runMode)) {
                edgeIsOrderList.remove(edge);
                keepEdgeIsOrderList.remove(edge);
            }
            siC.removeOrder(siP, dcHost, runMode);
        }
        if (Application.isTest(runMode)) {
            addExistingTestEdge(edge);
        } else {
            if (hbci.isNew()) {
View Full Code Here

    }

    public void addOrder(final HbConnectionInfo hbConnectionInfo,
                         final Host dcHost,
                         final Application.RunMode runMode) {
        final ServiceInfo siRsc = hbConnectionInfo.getLastServiceInfoRsc();
        final ServiceInfo siWithRsc = hbConnectionInfo.getLastServiceInfoWithRsc();
        if ((siWithRsc != null && siWithRsc.getService() != null && siWithRsc.getService().isNew())
            || (siRsc != null && siRsc.getService() != null && siRsc.getService().isNew())) {
            addOrder(null, siRsc, siWithRsc);
        } else {
            siWithRsc.addOrder(siRsc, dcHost, runMode);
        }
        if (Application.isTest(runMode)) {
            mHbConnectionReadLock.lock();
            final Edge edge;
            try {
View Full Code Here

            addExistingTestEdge(edge);
        }
    }

    public void removeColocation(final HbConnectionInfo hbci, final Host dcHost, final Application.RunMode runMode) {
        final ServiceInfo siRsc = hbci.getLastServiceInfoRsc();
        final ServiceInfo siWithRsc = hbci.getLastServiceInfoWithRsc();
        mHbConnectionReadLock.lock();
        final Edge edge;
        try {
            edge = hbconnectionToEdgeMap.get(hbci);
            if (edge == null) {
View Full Code Here

    /** Adds colocation. */
    public void addColocation(final HbConnectionInfo hbConnectionInfo,
                              final Host dcHost,
                              final Application.RunMode runMode) {
        final ServiceInfo siP = hbConnectionInfo.getLastServiceInfoParent();
        final ServiceInfo siC = hbConnectionInfo.getLastServiceInfoChild();
        if (siC != null
            && siC.getService() != null
            && siC.getService().isNew()) {
            addColocation(null, siP, siC);
        } else {
            siP.addColocation(siC, dcHost, runMode);
        }
        if (Application.isTest(runMode)) {
View Full Code Here

        if (vertexToHostMap.containsKey(v)) {
            return vertexToHostMap.get(v).getIconTextForGraph(runMode);
        } else if (vertexToConstraintPHMap.containsKey(v)) {
            return vertexToConstraintPHMap.get(v).getIconTextForGraph(runMode);
        }
        final ServiceInfo si = (ServiceInfo) getInfo(v);
        if (si == null) {
            return null;
        }
        return si.getIconTextForGraph(runMode);
    }
View Full Code Here

            final HostInfo hi = vertexToHostMap.get(v);
            return hi.getRightCornerTextForGraph(runMode);
        } else if (vertexToConstraintPHMap.containsKey(v)) {
            return null;
        }
        final ServiceInfo si = (ServiceInfo) getInfo(v);
        if (si != null) {
            return si.getRightCornerTextForGraph(runMode);
        }
        return null;
    }
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.