Interface XSiteStateProvider
- All Known Implementing Classes:
NoOpXSiteStateProvider
,XSiteStateProviderImpl
public interface XSiteStateProvider
It contains the logic to send state to another site.
- Since:
- 7.0
- Author:
- Pedro Ruivo
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancelStateTransfer
(String siteName) It cancels the state transfer for the remote site.ExposesCommandsFactory
toXSiteStatePushTask
.Exposes non-blockingExecutor
toXSiteStatePushTask
.ExposesIracManager
toXSiteStatePushTask
.ExposesRpcManager
toXSiteStatePushTask
.Exposes timeoutScheduledExecutorService
toXSiteStatePushTask
.getSitesMissingCoordinator
(Collection<Address> currentMembers) void
notifyStateTransferEnd
(String siteName, Address origin, boolean statusOk) NotifiesXSiteStatePushTask
has completed the send.void
startStateTransfer
(String siteName, Address requestor, int minTopologyId) It notifies this node to start sending state to the remote site.
-
Method Details
-
startStateTransfer
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.- Parameters:
siteName
- the remote site name.requestor
- the requestor.minTopologyId
- the topology id to wait before start sending the state.
-
cancelStateTransfer
It cancels the state transfer for the remote site. If no state transfer is available, it should do nothing.- Parameters:
siteName
- the remote site name.
-
getCurrentStateSending
Collection<String> getCurrentStateSending()- Returns:
- a site name collection with the sites in which this cache is sending state.
-
getSitesMissingCoordinator
- Returns:
- a site name collection with sites in which the coordinator is not in the
currentMembers
.
-
notifyStateTransferEnd
NotifiesXSiteStatePushTask
has completed the send.- Parameters:
siteName
- The remote site name.origin
- The originatorAddress
.statusOk
-true
if completed successfully,false
if it failed.
-
getCommandsFactory
CommandsFactory getCommandsFactory()ExposesCommandsFactory
toXSiteStatePushTask
. -
getRpcManager
RpcManager getRpcManager()ExposesRpcManager
toXSiteStatePushTask
. -
getIracManager
IracManager getIracManager()ExposesIracManager
toXSiteStatePushTask
. -
getScheduledExecutorService
ScheduledExecutorService getScheduledExecutorService()Exposes timeoutScheduledExecutorService
toXSiteStatePushTask
. -
getExecutor
Executor getExecutor()Exposes non-blockingExecutor
toXSiteStatePushTask
.
-