Package org.codehaus.activecluster

Examples of org.codehaus.activecluster.ClusterEvent


    public synchronized void shutdown(Node node) {
        Destination key = node.getDestination();
        nodes.remove(key);

        ClusterEvent event = new ClusterEvent(cluster, node, ClusterEvent.ADD_NODE);
        // lets take a copy to make contention easier
        Object[] array = listeners.toArray();
        for (int i = 0, size = array.length; i < size; i++) {
            ClusterListener listener = (ClusterListener) array[i];
            listener.onNodeRemoved(event);
View Full Code Here


    public void removeClusterListener(ClusterListener listener) {
        listeners.remove(listener);
    }

    protected void nodeAdded(Node node) {
        ClusterEvent event = new ClusterEvent(cluster, node, ClusterEvent.ADD_NODE);
        // lets take a copy to make contention easier
        Object[] array = listeners.toArray();
        for (int i = 0, size = array.length; i < size; i++) {
            ClusterListener listener = (ClusterListener) array[i];
            listener.onNodeAdd(event);
View Full Code Here

        }
        doElection();
    }

    protected void nodeUpdated(Node node) {
        ClusterEvent event = new ClusterEvent(cluster, node, ClusterEvent.UPDATE_NODE);
        // lets take a copy to make contention easier
        Object[] array = listeners.toArray();
        for (int i = 0, size = array.length; i < size; i++) {
            ClusterListener listener = (ClusterListener) array[i];
            listener.onNodeUpdate(event);
View Full Code Here

            listener.onNodeUpdate(event);
        }
    }

    protected void nodeFailed(Node node) {
        ClusterEvent event = new ClusterEvent(cluster, node, ClusterEvent.REMOVE_NODE);
        // lets take a copy to make contention easier
        Object[] array = listeners.toArray();
        for (int i = 0, size = array.length; i < size; i++) {
            ClusterListener listener = (ClusterListener) array[i];
            listener.onNodeFailed(event);
View Full Code Here

        }
        doElection();
    }
   
    protected void coordinatorChanged(Node node) {
        ClusterEvent event = new ClusterEvent(cluster, node, ClusterEvent.ELECTED_COORDINATOR);
        // lets take a copy to make contention easier
        Object[] array = listeners.toArray();
        for (int i = 0, size = array.length; i < size; i++) {
            ClusterListener listener = (ClusterListener) array[i];
            listener.onCoordinatorChanged(event);
View Full Code Here

TOP

Related Classes of org.codehaus.activecluster.ClusterEvent

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.