Interface ClusterControllerIfc

  • All Known Implementing Classes:
    ClusterController

    public interface ClusterControllerIfc
    Author:
    Artur Hefczyc Created Mar 16, 2011
    • Method Detail

      • handleClusterPacket

        void handleClusterPacket​(Element packet)
        Method handles cluster packet received from cluster connection.
        Parameters:
        packet - which should be handled
      • nodeConnected

        void nodeConnected​(String addr)
        Method is called on cluster node connection event. This is a notification to the component that a new cluster node has connected.
        Parameters:
        addr - is a hostname of a cluster node generating the event.
      • nodeDisconnected

        void nodeDisconnected​(String addr)
        Method is called on cluster node disconnection event. This is a notification to the component that there was network connection lost to one of the cluster nodes.
        Parameters:
        addr - is a hostname of a cluster node generating the event.
      • removeCommandListener

        void removeCommandListener​(CommandListener listener)
      • sendToNodes

        void sendToNodes​(String command,
                         Map<String,​String> data,
                         Queue<Element> packets,
                         JID fromNode,
                         Set<JID> visitedNodes,
                         JID... toNodes)
        Method which sends command to desired nodes
        Parameters:
        command - ID string of the command
        data - additional data to be included in the packet
        packets - collection of elements to be send to desired nodes
        fromNode - address of the source node
        visitedNodes - list of all already visited nodes
        toNodes - list of nodes to which packet should be sent
      • sendToNodes

        void sendToNodes​(String command,
                         Queue<Element> packets,
                         JID fromNode,
                         Set<JID> visitedNodes,
                         JID... toNodes)
        Method which sends command to desired nodes
        Parameters:
        command - ID string of the command
        packets - collection of elements to be send to desired nodes
        fromNode - address of the source node
        visitedNodes - list of all already visited nodes
        toNodes - list of nodes to which packet should be sent
      • sendToNodes

        void sendToNodes​(String command,
                         Map<String,​String> data,
                         JID fromNode,
                         Set<JID> visitedNodes,
                         JID... toNodes)
        Method which sends command to desired nodes
        Parameters:
        command - ID string of the command
        data - additional data to be included in the packet
        fromNode - address of the source node
        visitedNodes - list of all already visited nodes
        toNodes - list of nodes to which packet should be sent
      • sendToNodes

        void sendToNodes​(String command,
                         Map<String,​String> data,
                         JID fromNode,
                         JID... toNodes)
        Method which sends command to desired nodes
        Parameters:
        command - ID string of the command
        data - additional data to be included in the packet
        fromNode - address of the source node
        toNodes - list of nodes to which packet should be sent
      • sendToNodes

        void sendToNodes​(String command,
                         JID fromNode,
                         JID... toNodes)
        Method which sends command to desired nodes
        Parameters:
        command - ID string of the command
        fromNode - address of the source node
        toNodes - list of nodes to which packet should be sent
      • sendToNodes

        void sendToNodes​(String command,
                         Element packet,
                         JID fromNode,
                         Set<JID> visitedNodes,
                         JID... toNodes)
        Method which sends command to desired nodes
        Parameters:
        command - ID string of the command
        packet - collection of elements to be send to desired nodes
        fromNode - address of the source node
        visitedNodes - list of all already visited nodes
        toNodes - list of nodes to which packet should be sent
      • sendToNodes

        void sendToNodes​(String command,
                         Map<String,​String> data,
                         Element packet,
                         JID fromNode,
                         Set<JID> visitedNodes,
                         JID... toNodes)
        Method which sends command to desired nodes
        Parameters:
        command - ID string of the command
        data - additional data to be included in the packet
        packet - element to be send to desired nodes
        fromNode - address of the source node
        visitedNodes - list of all already visited nodes
        toNodes - list of nodes to which packet should be sent
      • setCommandListener

        void setCommandListener​(CommandListener listener)