public class XSiteStateTransferManagerImpl extends Object implements XSiteStateTransferManager
XSiteStateTransferManager
implementation.STATUS_CANCELED, STATUS_ERROR, STATUS_OK, STATUS_SENDING
Constructor and Description |
---|
XSiteStateTransferManagerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addListener() |
void |
becomeCoordinator(String siteName)
Makes this node the coordinator for the state transfer to the site name.
|
void |
cancelPushState(String siteName)
It cancels a running state transfer.
|
void |
cancelReceive(String siteName)
Sets the cluster to normal state.
|
void |
clearClusterStatus()
Clears the completed state transfer status in all the cluster.
|
void |
clearStatus()
Clears the completed state transfer status.
|
Map<String,String> |
getClusterStatus() |
List<String> |
getRunningStateTransfers() |
String |
getSendingSiteName() |
Map<String,String> |
getStatus() |
<K,V> void |
handleTopology(TopologyChangedEvent<K,V> topologyChangedEvent) |
void |
inject(RpcManager rpcManager,
Configuration configuration,
CommandsFactory commandsFactory,
ResponseGenerator responseGenerator,
StateTransferManager stateTransferManager,
CacheNotifier cacheNotifier,
XSiteStateConsumer consumer,
XSiteStateProvider provider,
ExecutorService asyncExecutor) |
void |
notifyStatePushFinished(String siteName,
Address node,
boolean statusOk)
It receives the notifications from local site when some node finishes pushing the state to the remote site.
|
void |
removeListener() |
void |
startPushState(String siteName)
It notifies all nodes from local site to start transfer the state to the remote site.
|
public void inject(RpcManager rpcManager, Configuration configuration, CommandsFactory commandsFactory, ResponseGenerator responseGenerator, StateTransferManager stateTransferManager, CacheNotifier cacheNotifier, XSiteStateConsumer consumer, XSiteStateProvider provider, ExecutorService asyncExecutor)
public void addListener()
public void removeListener()
public void notifyStatePushFinished(String siteName, Address node, boolean statusOk) throws Throwable
XSiteStateTransferManager
notifyStatePushFinished
in interface XSiteStateTransferManager
siteName
- the remote site namenode
- the Address
from the node that finishes.statusOk
- true
if no error or exception occurred during the state transfer.Throwable
- If some unexpected behavior occurs.public final void startPushState(String siteName) throws Throwable
XSiteStateTransferManager
startPushState
in interface XSiteStateTransferManager
siteName
- the remote site nameThrowable
- If some unexpected behavior occurs.public List<String> getRunningStateTransfers()
getRunningStateTransfers
in interface XSiteStateTransferManager
public Map<String,String> getStatus()
getStatus
in interface XSiteStateTransferManager
public void clearStatus()
XSiteStateTransferManager
clearStatus
in interface XSiteStateTransferManager
public void cancelPushState(String siteName) throws Throwable
XSiteStateTransferManager
cancelPushState
in interface XSiteStateTransferManager
siteName
- the site name to where the state is being sent.Throwable
- if some exception occurs during the remote invocation with the local cluster or remote site.public Map<String,String> getClusterStatus() throws Exception
getClusterStatus
in interface XSiteStateTransferManager
Exception
- if some exception during the remote invocation occurs.public void clearClusterStatus() throws Exception
XSiteStateTransferManager
clearClusterStatus
in interface XSiteStateTransferManager
Exception
- if some exception occurs during the remote invocation.public String getSendingSiteName()
getSendingSiteName
in interface XSiteStateTransferManager
null
if this node is not receiving state or the site name which is sending the state.public void cancelReceive(String siteName) throws Exception
XSiteStateTransferManager
cancelReceive
in interface XSiteStateTransferManager
siteName
- the site name which is sending the state.Exception
- if some exception occurs during the remote invocation.public void becomeCoordinator(String siteName)
XSiteStateTransferManager
becomeCoordinator
in interface XSiteStateTransferManager
siteName
- the site name.public <K,V> void handleTopology(TopologyChangedEvent<K,V> topologyChangedEvent)
Copyright © 2021 JBoss, a division of Red Hat. All rights reserved.