Package org.codehaus.activecluster

Examples of org.codehaus.activecluster.Node


     * @param cluster
     * @return the elected Node
     * @throws JMSException
     */
    public Node doElection(Cluster cluster) throws JMSException {
        Node elect = cluster.getLocalNode();

        Map nodes = cluster.getNodes();
        for (Iterator i = nodes.values().iterator(); i.hasNext();) {
            Node node = (Node) i.next();
            if (elect.getName().compareTo(node.getName()) < 0) {
                elect = node;
            }
        }

        return elect;
View Full Code Here


        }

        if (message instanceof ObjectMessage) {
            ObjectMessage objectMessage = (ObjectMessage) message;
            try {
                Node node = (Node) objectMessage.getObject();
                String type = objectMessage.getJMSType();
                if (type != null && type.equals("shutdown")) {
                    stateService.shutdown(node);
                }
                else {
View Full Code Here

TOP

Related Classes of org.codehaus.activecluster.Node

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.