Class NoOpXSiteStateProvider

  • All Implemented Interfaces:
    XSiteStateProvider

    public class NoOpXSiteStateProvider
    extends java.lang.Object
    implements XSiteStateProvider
    A no-op implementation of XSiteStateProvider.

    This class is used when cross-site replication is disabled.

    Since:
    10.0
    Author:
    Pedro Ruivo
    • Method Detail

      • startStateTransfer

        public void startStateTransfer​(java.lang.String siteName,
                                       Address requestor,
                                       int minTopologyId)
        Description copied from interface: XSiteStateProvider
        It notifies this node to start sending state to the remote site. Also, it should keep information about which node requested the state transfer in order to send back the notification when finishes.
        Specified by:
        startStateTransfer in interface XSiteStateProvider
        Parameters:
        siteName - the remote site name.
        requestor - the requestor.
        minTopologyId - the topology id to wait before start sending the state.
      • cancelStateTransfer

        public void cancelStateTransfer​(java.lang.String siteName)
        Description copied from interface: XSiteStateProvider
        It cancels the state transfer for the remote site. If no state transfer is available, it should do nothing.
        Specified by:
        cancelStateTransfer in interface XSiteStateProvider
        Parameters:
        siteName - the remote site name.
      • getCurrentStateSending

        public java.util.Collection<java.lang.String> getCurrentStateSending()
        Specified by:
        getCurrentStateSending in interface XSiteStateProvider
        Returns:
        a site name collection with the sites in which this cache is sending state.
      • getSitesMissingCoordinator

        public java.util.Collection<java.lang.String> getSitesMissingCoordinator​(java.util.Collection<Address> currentMembers)
        Specified by:
        getSitesMissingCoordinator in interface XSiteStateProvider
        Returns:
        a site name collection with sites in which the coordinator is not in the currentMembers.
      • toString

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