Class XSiteStateProviderImpl
java.lang.Object
org.infinispan.xsite.statetransfer.XSiteStateProviderImpl
- All Implemented Interfaces:
XSiteStateProvider
It contains the logic to send state to another site.
- Since:
- 7.0
- Author:
- Pedro Ruivo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelStateTransfer(String siteName) It cancels the state transfer for the remote site.ExposesCommandsFactorytoXSiteStatePushTask.Exposes non-blockingExecutortoXSiteStatePushTask.ExposesIracManagertoXSiteStatePushTask.ExposesRpcManagertoXSiteStatePushTask.Exposes timeoutScheduledExecutorServicetoXSiteStatePushTask.getSitesMissingCoordinator(Collection<Address> currentMembers) voidnotifyStateTransferEnd(String siteName, Address origin, boolean statusOk) NotifiesXSiteStatePushTaskhas completed the send.voidstart()voidstartStateTransfer(String siteName, Address origin, int minTopologyId) It notifies this node to start sending state to the remote site.
-
Constructor Details
-
XSiteStateProviderImpl
-
-
Method Details
-
start
public void start() -
startStateTransfer
Description copied from interface:XSiteStateProviderIt 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:
startStateTransferin interfaceXSiteStateProvider- Parameters:
siteName- the remote site name.origin- the requestor.minTopologyId- the topology id to wait before start sending the state.
-
cancelStateTransfer
Description copied from interface:XSiteStateProviderIt cancels the state transfer for the remote site. If no state transfer is available, it should do nothing.- Specified by:
cancelStateTransferin interfaceXSiteStateProvider- Parameters:
siteName- the remote site name.
-
getCurrentStateSending
- Specified by:
getCurrentStateSendingin interfaceXSiteStateProvider- Returns:
- a site name collection with the sites in which this cache is sending state.
-
getSitesMissingCoordinator
- Specified by:
getSitesMissingCoordinatorin interfaceXSiteStateProvider- Returns:
- a site name collection with sites in which the coordinator is not in the
currentMembers.
-
notifyStateTransferEnd
Description copied from interface:XSiteStateProviderNotifiesXSiteStatePushTaskhas completed the send.- Specified by:
notifyStateTransferEndin interfaceXSiteStateProvider- Parameters:
siteName- The remote site name.origin- The originatorAddress.statusOk-trueif completed successfully,falseif it failed.
-
getCommandsFactory
Description copied from interface:XSiteStateProviderExposesCommandsFactorytoXSiteStatePushTask.- Specified by:
getCommandsFactoryin interfaceXSiteStateProvider
-
getRpcManager
Description copied from interface:XSiteStateProviderExposesRpcManagertoXSiteStatePushTask.- Specified by:
getRpcManagerin interfaceXSiteStateProvider
-
getIracManager
Description copied from interface:XSiteStateProviderExposesIracManagertoXSiteStatePushTask.- Specified by:
getIracManagerin interfaceXSiteStateProvider
-
getScheduledExecutorService
Description copied from interface:XSiteStateProviderExposes timeoutScheduledExecutorServicetoXSiteStatePushTask.- Specified by:
getScheduledExecutorServicein interfaceXSiteStateProvider
-
getExecutor
Description copied from interface:XSiteStateProviderExposes non-blockingExecutortoXSiteStatePushTask.- Specified by:
getExecutorin interfaceXSiteStateProvider
-