Interface ClusterStateChangeFacility


  • public interface ClusterStateChangeFacility

    Rhino extension facility that reports to a resource adaptor entity nodes on which it is activated or deactivated in the cluster.

    As of Rhino 3.2, this facility has been updated to provide similar functionality for nodes running in the POOL clustering mode rather than the SAVANNA clustering mode but with some limitations. Refer to the documentation in the listener interfaces for more detail.

    • Method Detail

      • getClusteringMode

        ClusterStateChangeFacility.ClusteringMode getClusteringMode()

        Get the clustering mode that the node is configured to use.

        Returns:
        the clustering mode configured for the node.
        Since:
        Rhino 3.2
      • isClusterMember

        boolean isClusterMember​(String nodeID)

        Determine if the specified node is a current live cluster member.

        Note
        For compatibility with pool mode, this method requires the node ID to be expressed as a String value. When using the savanna clustering mode, an integer node ID can be converted to the appropriate string value for this method using String.valueOf(int).
        Parameters:
        nodeID - the node ID to check.
        Returns:
        true if the specified node is a current cluster member, false otherwise.
        Throws:
        NullPointerException - if nodeID is null.
        Since:
        Rhino 3.2
      • addStateChangeListener

        void addStateChangeListener​(ClusterStateChangeListener listener)

        Add a state change listener.

        If the listener has not already been added then clusterStateChange will be immediately invoked on it to notify the listener of the current cluster state. In this instance the joined set will be equal to the running set.

        Typically this method would be called in raConfigure(ConfigProperties) or raActive()

        Parameters:
        listener - the state change listener
      • addStateChangeListener

        void addStateChangeListener​(ClusterStateChangeListenerV2 listener)

        Add a v2 state change listener.

        If the listener has not already been added then clusterStateChange will be immediately invoked on it to notify the listener of the current cluster state.

        Typically this method would be called in raConfigure(ConfigProperties) or raActive().

        Parameters:
        listener - the state change listener.
        Since:
        Rhino 2.6.1
      • addStateChangeListener

        void addStateChangeListener​(ClusterStateChangeListenerV3 listener)

        Add a v3 state change listener.

        If the listener has not already been added then clusterStateChange will be immediately invoked on it to notify the listener of the current cluster state.

        Typically this method would be called in raConfigure(ConfigProperties) or raActive().

        Parameters:
        listener - the state change listener.
        Since:
        Rhino 3.2
      • removeStateChangeListener

        void removeStateChangeListener​(ClusterStateChangeListener listener)

        Remove a state change listener. This method does nothing if the specified listener was not previously added or has already been removed.

        This method would typically be called in raUnconfigure(), raStopping(), or raInactive()

        Parameters:
        listener -
      • removeStateChangeListener

        void removeStateChangeListener​(ClusterStateChangeListenerV2 listener)

        Remove a v2 state change listener. This method does nothing if the specified listener was not previously added or has already been removed.

        This method would typically be called in raUnconfigure(), raStopping(), or raInactive().

        Parameters:
        listener - the state change listener.
        Since:
        Rhino 2.6.1
      • removeStateChangeListener

        void removeStateChangeListener​(ClusterStateChangeListenerV3 listener)

        Remove a v3 state change listener. This method does nothing if the specified listener was not previously added or has already been removed.

        This method would typically be called in raUnconfigure(), raStopping(), or raInactive().

        Parameters:
        listener - the state change listener.
        Since:
        Rhino 3.2