Interface IClusterConnection

    • Method Detail

      • open

        void open()
           throws ClusterOpenException
        Opens this connection. When no node exists yet, a new group is created. Otherwise, when a group exists already, joins that groups.
        Throws:
        ClusterOpenException - When the connection could not be opened, such as due to a network failure etc.
      • close

        void close()
        Closes the connection to other nodes. This method closes the entire cluster, so that no more nodes can be added to the group.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
      • disconnect

        void disconnect()
        Disconnects the node from the cluster. The node can join the cluster again later by calling open().
      • getTopologyObserver

        IClusterTopologyObserver getTopologyObserver()
        Returns:
        The observer that can be used to listen for changes to the cluster topology (e.g. when a node is added or removed from the cluster).
      • getChannelObserver

        IClusterChannelStateObserver getChannelObserver()
        Returns:
        The observer that can be used to listen for changes to the channel state, e.g. when the connection to a node was established or cut, or the channel was closed.
      • getMessageObserver

        IClusterMessageObserver getMessageObserver()
        Returns:
        The observer that can be used to listen for messages sent between nodes.
      • getCluster

        ICluster getCluster()
        Returns:
        The cluster to