Class BaseXSiteStateProviderState<T extends org.infinispan.xsite.statetransfer.BaseXSiteStateProviderState.OutboundTask>
java.lang.Object
org.infinispan.xsite.statetransfer.BaseXSiteStateProviderState<T>
- All Implemented Interfaces:
XSiteStateProviderState
- Direct Known Subclasses:
AsyncProviderState
,SyncProviderState
public abstract class BaseXSiteStateProviderState<T extends org.infinispan.xsite.statetransfer.BaseXSiteStateProviderState.OutboundTask>
extends Object
implements XSiteStateProviderState
Common code for
AsyncProviderState
and SyncProviderState
implementation.
The only difference between the two implementation is the way the state is send to the remote site. The synchronous implementation sends the state directly while the asynchronous makes use of IRAC (and its conflict resolution).
- Since:
- 12.0
- Author:
- Pedro Ruivo
-
Constructor Summary
ConstructorDescriptionBaseXSiteStateProviderState
(org.infinispan.xsite.XSiteBackup backup, XSiteStateTransferConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Cancels any running state transfer.createPushTask
(Address originator, XSiteStateProvider provider) Creates a newXSiteStatePushTask
to do state transfer to remove site.boolean
isOriginatorMissing
(Collection<Address> members) Returnsboolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.infinispan.xsite.statetransfer.XSiteStateProviderState
isSync
-
Constructor Details
-
BaseXSiteStateProviderState
public BaseXSiteStateProviderState(org.infinispan.xsite.XSiteBackup backup, XSiteStateTransferConfiguration configuration)
-
-
Method Details
-
createPushTask
Description copied from interface:XSiteStateProviderState
Creates a newXSiteStatePushTask
to do state transfer to remove site.- Specified by:
createPushTask
in interfaceXSiteStateProviderState
- Parameters:
originator
- The originatorAddress
(node who initiated the state transfer).provider
- TheXSiteStateProvider
instance to notify when theXSiteStatePushTask
finishes.- Returns:
- The
XSiteStatePushTask
instance. ornull
if a state transfer is already in progress.
-
cancelTransfer
public void cancelTransfer()Description copied from interface:XSiteStateProviderState
Cancels any running state transfer.If no state transfer is in progress, this method is a no-op.
- Specified by:
cancelTransfer
in interfaceXSiteStateProviderState
-
isSending
public boolean isSending()- Specified by:
isSending
in interfaceXSiteStateProviderState
- Returns:
true
if a state transfer is in progress for this site.
-
isOriginatorMissing
Description copied from interface:XSiteStateProviderState
Returns- Specified by:
isOriginatorMissing
in interfaceXSiteStateProviderState
- Parameters:
members
- The current cluster members list.- Returns:
true
if a state transfer is in progress and the originator is not in thatCollection
.
-