Class XSiteStateConsumerImpl
- java.lang.Object
-
- org.infinispan.xsite.statetransfer.XSiteStateConsumerImpl
-
- All Implemented Interfaces:
XSiteStateConsumer
public class XSiteStateConsumerImpl extends Object implements XSiteStateConsumer
It contains the logic needed to consume the state sent from other site.- Since:
- 7.0
- Author:
- Pedro Ruivo
-
-
Constructor Summary
Constructors Constructor Description XSiteStateConsumerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyState(XSiteState[] chunk)
It applies state from other site.void
endStateTransfer(String sendingSite)
It notifies the end of state transfer from other site.String
getSendingSiteName()
void
startStateTransfer(String sendingSite)
It notifies the start of state transfer from other site.
-
-
-
Method Detail
-
startStateTransfer
public void startStateTransfer(String sendingSite)
Description copied from interface:XSiteStateConsumer
It notifies the start of state transfer from other site.- Specified by:
startStateTransfer
in interfaceXSiteStateConsumer
- Parameters:
sendingSite
- the site name that will send the state.
-
endStateTransfer
public void endStateTransfer(String sendingSite)
Description copied from interface:XSiteStateConsumer
It notifies the end of state transfer from other site.- Specified by:
endStateTransfer
in interfaceXSiteStateConsumer
- Parameters:
sendingSite
- the site name that is sending the state.
-
applyState
public void applyState(XSiteState[] chunk) throws Exception
Description copied from interface:XSiteStateConsumer
It applies state from other site.- Specified by:
applyState
in interfaceXSiteStateConsumer
- Parameters:
chunk
- a chunk of keys- Throws:
Exception
- if something go wrong while applying the state
-
getSendingSiteName
public String getSendingSiteName()
- Specified by:
getSendingSiteName
in interfaceXSiteStateConsumer
- Returns:
- the site name that is sending the state.
-
-