Class XSiteStateProviderImpl
- java.lang.Object
-
- org.infinispan.xsite.statetransfer.XSiteStateProviderImpl
-
- All Implemented Interfaces:
XSiteStateProvider
public class XSiteStateProviderImpl extends Object implements XSiteStateProvider
It contains the logic to send state to another site.- Since:
- 7.0
- Author:
- Pedro Ruivo
-
-
Constructor Summary
Constructors Constructor Description XSiteStateProviderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelStateTransfer(String siteName)
It cancels the state transfer for the remote site.Collection<String>
getCurrentStateSending()
Collection<String>
getSitesMissingCoordinator(Collection<Address> currentMembers)
void
startStateTransfer(String siteName, Address origin, int minTopologyId)
It notifies this node to start sending state to the remote site.
-
-
-
Method Detail
-
startStateTransfer
public void startStateTransfer(String siteName, Address origin, 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 interfaceXSiteStateProvider
- Parameters:
siteName
- the remote site name.origin
- the requestor.minTopologyId
- the topology id to wait before start sending the state.
-
cancelStateTransfer
public void cancelStateTransfer(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 interfaceXSiteStateProvider
- Parameters:
siteName
- the remote site name.
-
getCurrentStateSending
public Collection<String> getCurrentStateSending()
- Specified by:
getCurrentStateSending
in interfaceXSiteStateProvider
- Returns:
- a site name collection with the sites in which this cache is sending state.
-
getSitesMissingCoordinator
public Collection<String> getSitesMissingCoordinator(Collection<Address> currentMembers)
- Specified by:
getSitesMissingCoordinator
in interfaceXSiteStateProvider
- Returns:
- a site name collection with sites in which the coordinator is not in the
currentMembers
.
-
-