Class NoOpXSiteStateTransferManager

    • Constructor Detail

      • NoOpXSiteStateTransferManager

        public NoOpXSiteStateTransferManager()
    • Method Detail

      • notifyStatePushFinished

        public void notifyStatePushFinished​(java.lang.String siteName,
                                            Address node,
                                            boolean statusOk)
        Description copied from interface: XSiteStateTransferManager
        It receives the notifications from local site when some node finishes pushing the state to the remote site.
        Specified by:
        notifyStatePushFinished in interface XSiteStateTransferManager
        Parameters:
        siteName - the remote site name
        node - the Address from the node that finishes.
        statusOk - true if no error or exception occurred during the state transfer.
      • startPushState

        public void startPushState​(java.lang.String siteName)
        Description copied from interface: XSiteStateTransferManager
        It notifies all nodes from local site to start transfer the state to the remote site.
        Specified by:
        startPushState in interface XSiteStateTransferManager
        Parameters:
        siteName - the remote site name
      • getStatus

        public java.util.Map<java.lang.String,​java.lang.String> getStatus()
        Specified by:
        getStatus in interface XSiteStateTransferManager
        Returns:
        the completed state transfer status for which this node is the coordinator.
      • getClusterStatus

        public java.util.Map<java.lang.String,​java.lang.String> getClusterStatus()
        Specified by:
        getClusterStatus in interface XSiteStateTransferManager
        Returns:
        the completed state transfer status from all the coordinators in the cluster.
      • getSendingSiteName

        public java.lang.String getSendingSiteName()
        Specified by:
        getSendingSiteName in interface XSiteStateTransferManager
        Returns:
        null if this node is not receiving state or the site name which is sending the state.
      • cancelReceive

        public void cancelReceive​(java.lang.String siteName)
        Description copied from interface: XSiteStateTransferManager
        Sets the cluster to normal state.

        The main use for this method is when the link between the sites is broken and the receiver site keeps it state transfer state forever.

        Specified by:
        cancelReceive in interface XSiteStateTransferManager
        Parameters:
        siteName - the site name which is sending the state.
      • becomeCoordinator

        public void becomeCoordinator​(java.lang.String siteName)
        Description copied from interface: XSiteStateTransferManager
        Makes this node the coordinator for the state transfer to the site name.

        This method is invoked when the coordinator dies and this node receives a late start state transfer request.

        Specified by:
        becomeCoordinator in interface XSiteStateTransferManager
        Parameters:
        siteName - the site name.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object